From 3d62e7548955e2ddf298c61a55fcd26007ea27bb Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 11 May 2023 22:56:32 +0300 Subject: [PATCH] Revert "wayland: Avoid pointer warp if constraint region is invalid" This reverts commit 7c91c4bad9ee709eebfdf9d5b3997fa00ca7cd13. It created regressions in some video games. After a closer look at the pointer constraint region handling, there are some issues, but it might be safer to fix them in master. In meanwhile, let's revert 7c91c4bad because it breaks more things than it fixes. CCBUG: 457021 BUG: 469555 (cherry picked from commit 07da1796b8388b00275d8281fac476bde71cd02b) --- src/pointer_input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pointer_input.cpp b/src/pointer_input.cpp index 2b582649a61..d47b5bc47d3 100644 --- a/src/pointer_input.cpp +++ b/src/pointer_input.cpp @@ -669,7 +669,7 @@ void PointerInputRedirection::updatePointerConstraints() lock->setLocked(false); m_locked = false; disconnectLockedPointerAboutToBeUnboundConnection(); - if (!(hint.x() < 0 || hint.y() < 0 || !lock->region().contains(hint.toPoint())) && focus()) { + if (!(hint.x() < 0 || hint.y() < 0) && focus()) { processMotionAbsolute(focus()->mapFromLocal(hint), waylandServer()->seat()->timestamp()); } } @@ -684,7 +684,7 @@ void PointerInputRedirection::updatePointerConstraints() // In this case the cached cursor position hint must be fetched before the resource goes away m_lockedPointerAboutToBeUnboundConnection = connect(lock, &KWaylandServer::LockedPointerV1Interface::aboutToBeDestroyed, this, [this, lock]() { const auto hint = lock->cursorPositionHint(); - if (hint.x() < 0 || hint.y() < 0 || !lock->region().contains(hint.toPoint()) || !focus()) { + if (hint.x() < 0 || hint.y() < 0 || !focus()) { return; } auto globalHint = focus()->mapFromLocal(hint); -- GitLab