From 0ddcc85f68eb44210e75efc63dcded0eae52a382 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 13 Jan 2024 14:46:54 +0200 Subject: [PATCH] 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. --- src/plugins/shakecursor/shakecursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/shakecursor/shakecursor.cpp b/src/plugins/shakecursor/shakecursor.cpp index 5d5b7d1ced..21a5d89faf 100644 --- a/src/plugins/shakecursor/shakecursor.cpp +++ b/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; }