Blame SOURCES/0015-Hook-up-queryKeyboardModifers.patch

93bb3c
From 75693b47dcac101f74f98e5902c4c6b39d407e4f Mon Sep 17 00:00:00 2001
429548
From: David Redondo <qt@david-redondo.de>
429548
Date: Wed, 26 May 2021 14:49:40 +0200
93bb3c
Subject: [PATCH 15/40] Hook up queryKeyboardModifers
429548
429548
Can be useful when upon enter a modifiers event is received but no key
429548
event so no QKeyEvent is generated.
429548
429548
Fixes: QTBUG-62786
429548
Change-Id: I30b57fc78ce6d54d8f644ca95ba40e7e26eb24ed
429548
Reviewed-by: Marco Martin <mart@kde.org>
429548
Reviewed-by: David Edmundson <davidedmundson@kde.org>
429548
429548
429548
(cherry picked from commit 4fa2baba8181ade4958a94e9531ec4f6919438a9)
429548
---
429548
 src/client/qwaylandintegration.cpp | 8 ++++++++
429548
 src/client/qwaylandintegration_p.h | 2 ++
429548
 2 files changed, 10 insertions(+)
429548
429548
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
429548
index c53ccb78..e5e7dd42 100644
429548
--- a/src/client/qwaylandintegration.cpp
429548
+++ b/src/client/qwaylandintegration.cpp
429548
@@ -262,6 +262,14 @@ QWaylandDisplay *QWaylandIntegration::display() const
429548
     return mDisplay.data();
429548
 }
429548
 
429548
+Qt::KeyboardModifiers QWaylandIntegration::queryKeyboardModifiers() const
429548
+{
429548
+    if (auto *seat = mDisplay->currentInputDevice()) {
429548
+        return seat->modifiers();
429548
+    }
429548
+    return Qt::NoModifier;
429548
+}
429548
+
429548
 QList<int> QWaylandIntegration::possibleKeys(const QKeyEvent *event) const
429548
 {
429548
     if (auto *seat = mDisplay->currentInputDevice())
429548
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
429548
index ff70ae25..73b80658 100644
429548
--- a/src/client/qwaylandintegration_p.h
429548
+++ b/src/client/qwaylandintegration_p.h
429548
@@ -107,6 +107,8 @@ public:
429548
 
429548
     QWaylandDisplay *display() const;
429548
 
429548
+    Qt::KeyboardModifiers queryKeyboardModifiers() const override;
429548
+
429548
     QList<int> possibleKeys(const QKeyEvent *event) const override;
429548
 
429548
     QStringList themeNames() const override;
429548
-- 
93bb3c
2.35.1
429548