diff options
author | JiDe Zhang <zhangjide@uniontech.com> | 2024-03-05 16:08:00 +0000 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-03-10 16:51:56 +0000 |
commit | fc3df6d3d62759e7abd2518792a77a1daf3fb6c8 (patch) | |
tree | da7b02b9bbc93fba6fdb5f089288cfced01aa717 /src/client/qwaylanddisplay_p.h | |
parent | 95b8818ae1c3f24fb9dac1e59929c77a08b47b16 (diff) |
Support multi-key for input context plugin
Sync from QPlatformInputContextFactory::requested in
8596998cb025a8338c9403f5ef9db5a23f5cc682 of qtbase to
QPlatformInputContextFactory.
Fixes: QTBUG-120202
Change-Id: Ib15d8a59c4cb3baaa19355ed5d7c30c87a7a1c16
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/client/qwaylanddisplay_p.h')
-rw-r--r-- | src/client/qwaylanddisplay_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h index 234524925..5b564c8d7 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -40,6 +40,8 @@ struct wp_viewport; QT_BEGIN_NAMESPACE +#define WAYLAND_IM_KEY "wayland" + class QAbstractEventDispatcher; class QSocketNotifier; class QPlatformScreen; @@ -253,7 +255,7 @@ public: wl_event_queue *frameEventQueue() { return m_frameEventQueue; }; bool isKeyboardAvailable() const; - bool isClientSideInputContextRequested() const; + bool isWaylandInputContextRequested() const; void initEventThread(); @@ -357,9 +359,9 @@ private: static const wl_callback_listener syncCallbackListener; bool mWaylandTryReconnect = false; - bool mClientSideInputContextRequested = [] () { - const QString& requested = QPlatformInputContextFactory::requested(); - return !requested.isEmpty() && requested != QLatin1String("wayland"); + bool mWaylandInputContextRequested = [] () { + const auto requested = QPlatformInputContextFactory::requested(); + return requested.isEmpty() || requested.contains(QLatin1String(WAYLAND_IM_KEY)); }(); QStringList mTextInputManagerList; int mTextInputManagerIndex = INT_MAX; |