Only return modifiers if we have focus
If we don't have focus, we can't infer anything about the state of keys. Change-Id: I773a3d7768abe6d595f0ffbc279d61a47c27ea24 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
ef140369ba
commit
0a8d63ea67
@ -284,7 +284,7 @@ QWaylandDisplay *QWaylandIntegration::display() const
|
||||
|
||||
Qt::KeyboardModifiers QWaylandIntegration::queryKeyboardModifiers() const
|
||||
{
|
||||
if (auto *seat = mDisplay->currentInputDevice()) {
|
||||
if (auto *seat = mDisplay->currentInputDevice(); seat && seat->keyboardFocus()) {
|
||||
return seat->modifiers();
|
||||
}
|
||||
return Qt::NoModifier;
|
||||
|
Loading…
x
Reference in New Issue
Block a user