Skip to content

Commit

Permalink
Keyboard State Indicator: do not toggle on left click
Browse files Browse the repository at this point in the history
This suppresses toggling states when accessing the context menu
  • Loading branch information
isf63 committed Sep 7, 2023
1 parent 7cfb999 commit 1c67385
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin-kbindicator/src/content.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <QLabel>
#include <QDebug>
#include <QEvent>
#include <QMouseEvent>
#include <QIcon>
#include <QToolButton>
#include <QFileInfo>
Expand Down Expand Up @@ -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<QMouseEvent*>(event)->button() == Qt::LeftButton)
{
if (object == m_capsLock)
emit controlClicked(Controls::Caps);
Expand Down

0 comments on commit 1c67385

Please sign in to comment.