xwayland: Avoid forwarding spurious mouse events

pointerEvents contain all motion events, the xwayland filter is only
concerned with forwarding clicks. Right now we would update an invalid
button state constantly. It did nothing harmful but was still a bit
silly.
This commit is contained in:
David Edmundson 2024-05-20 22:41:44 +01:00 committed by Vlad Zahorodnii
parent 7ba6c08fa7
commit c65f01e5dc

View file

@ -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();