fix Meta key randomly stops opening Plasma launcher menu
BUG: 391322
This commit is contained in:
parent
1e1ad82f3b
commit
8da06a0bdb
2 changed files with 3 additions and 7 deletions
|
@ -39,7 +39,7 @@ void ModifierOnlyShortcuts::keyEvent(KeyEvent *event)
|
|||
m_pressedKeys.insert(event->nativeScanCode());
|
||||
if (wasEmpty && m_pressedKeys.size() == 1 &&
|
||||
!ScreenLockerWatcher::self()->isLocked() &&
|
||||
m_buttonPressCount == 0 &&
|
||||
m_pressedButtons == Qt::NoButton &&
|
||||
m_cachedMods == Qt::NoModifier) {
|
||||
m_modifier = Qt::KeyboardModifier(int(event->modifiersRelevantForGlobalShortcuts()));
|
||||
} else {
|
||||
|
@ -77,11 +77,7 @@ void ModifierOnlyShortcuts::pointerEvent(MouseEvent *event)
|
|||
if (event->type() == QEvent::MouseMove) {
|
||||
return;
|
||||
}
|
||||
if (event->type() == QEvent::MouseButtonPress) {
|
||||
m_buttonPressCount++;
|
||||
} else if (event->type() == QEvent::MouseButtonRelease) {
|
||||
m_buttonPressCount--;
|
||||
}
|
||||
m_pressedButtons = event->buttons();
|
||||
reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
private:
|
||||
Qt::KeyboardModifier m_modifier = Qt::NoModifier;
|
||||
Qt::KeyboardModifiers m_cachedMods;
|
||||
uint m_buttonPressCount = 0;
|
||||
Qt::MouseButtons m_pressedButtons;
|
||||
QSet<quint32> m_pressedKeys;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue