diff --git a/plugin-kbindicator/src/content.cpp b/plugin-kbindicator/src/content.cpp index ed034108d..f688f2886 100644 --- a/plugin-kbindicator/src/content.cpp +++ b/plugin-kbindicator/src/content.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -131,12 +132,16 @@ bool Content::eventFilter(QObject *object, QEvent *event) { if (event->type() == QEvent::QEvent::MouseButtonRelease) { - if (object == m_capsLock) - emit controlClicked(Controls::Caps); - else if (object == m_numLock) - emit controlClicked(Controls::Num); - else if (object == m_scrollLock) - emit controlClicked(Controls::Scroll); + Qt::MouseButton btn = static_cast(event)->button(); + if (btn == Qt::LeftButton || btn == Qt::MiddleButton) + { + if (object == m_capsLock) + emit controlClicked(Controls::Caps); + else if (object == m_numLock) + emit controlClicked(Controls::Num); + else if (object == m_scrollLock) + emit controlClicked(Controls::Scroll); + } } return QWidget::eventFilter(object, event);