plugins/shakecursor: Ignore motion events with at least one pressed button

It reduces the chances of false triggering the plugin, for example if
the user presses a mouse button and chaotically moves the pointer
because they navigate in 3D space and what not.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 1f74e9a5c5
commit 0ddcc85f68
  1. 2
      src/plugins/shakecursor/shakecursor.cpp

@ -72,7 +72,7 @@ bool ShakeCursorEffect::isActive() const
void ShakeCursorEffect::pointerEvent(MouseEvent *event)
{
if (event->type() != QEvent::MouseMove) {
if (event->type() != QEvent::MouseMove || event->buttons() != Qt::NoButton) {
return;
}

Loading…
Cancel
Save