Revert "wayland: Avoid pointer warp if constraint region is invalid"

This reverts commit 7c91c4bad9.

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
This commit is contained in:
Vlad Zahorodnii 2023-05-11 22:56:32 +03:00
parent 16ee683a64
commit 07da1796b8

View file

@ -678,7 +678,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());
}
}
@ -693,7 +693,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);