diff --git a/src/xwayland/xwayland.cpp b/src/xwayland/xwayland.cpp index 5fd5b7b62d..a27da9ec9d 100644 --- a/src/xwayland/xwayland.cpp +++ b/src/xwayland/xwayland.cpp @@ -404,6 +404,9 @@ public: if (!m_filterMouse || (window && window->isLockScreen())) { return; } + if (event->type() != QEvent::MouseButtonPress && event->type() != QEvent::MouseButtonRelease) { + return; + } auto pointer = waylandServer()->seat()->pointer(); auto surface = pointer->focusedSurface();