From 1c673852bc9b18c144dbe90e4e2e366d65a120d3 Mon Sep 17 00:00:00 2001 From: Ian Farrell Date: Wed, 6 Sep 2023 20:36:05 -0400 Subject: [PATCH] Keyboard State Indicator: do not toggle on left click This suppresses toggling states when accessing the context menu --- plugin-kbindicator/src/content.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-kbindicator/src/content.cpp b/plugin-kbindicator/src/content.cpp index ed034108d..6d4040756 100644 --- a/plugin-kbindicator/src/content.cpp +++ b/plugin-kbindicator/src/content.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -129,7 +130,8 @@ QWidget* Content::widget(Controls cnt) const bool Content::eventFilter(QObject *object, QEvent *event) { - if (event->type() == QEvent::QEvent::MouseButtonRelease) + if (event->type() == QEvent::QEvent::MouseButtonRelease + && static_cast(event)->button() == Qt::LeftButton) { if (object == m_capsLock) emit controlClicked(Controls::Caps);