Commit bac4f4ed authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Revert "Remove mysterious s_cursorUpdateBlocking boolean flag in pointer_input.cpp"

This reverts commit 3d0bdc56.

seat->setFocusedPointerSurface() before notifyPointerMotion() is needed
to prevent sending a motion event that's outside the previously focused

BUG: 449273

(cherry picked from commit aaa07f06)
parent e91d99bc
Pipeline #141598 passed with stage
in 24 minutes and 16 seconds
......@@ -548,6 +548,8 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl
m_decorationDestroyedConnection = connect(now, &QObject::destroyed, this, &PointerInputRedirection::update, Qt::QueuedConnection);
static bool s_cursorUpdateBlocking = false;
void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow)
if (AbstractClient *ac = qobject_cast<AbstractClient*>(focusOld)) {
......@@ -568,6 +570,11 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
// prevent updating cursor and sending motion event outside the previously focused surface
s_cursorUpdateBlocking = true;
s_cursorUpdateBlocking = false;
seat->setFocusedPointerSurface(focusNow->surface(), focusNow->inputTransformation());
......@@ -1014,6 +1021,10 @@ void CursorImage::handlePointerChanged()
void CursorImage::handleFocusedSurfaceChanged()
if (s_cursorUpdateBlocking) {
KWaylandServer::PointerInterface *pointer = waylandServer()->seat()->pointer();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment