diff options
| author | Dmitry Kazakov <dimula73@gmail.com> | 2025-05-28 12:59:25 +0200 |
|---|---|---|
| committer | Dmitry Kazakov <dimula73@gmail.com> | 2025-09-12 13:59:48 +0200 |
| commit | b5147dca11ea67f72c8292d95f7de7f6853b11fc (patch) | |
| tree | 95460ed390dd2e047681f6e5e46e8fa28cf12398 /src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | |
| parent | 1b4abf645afe3dc137dbdb6e9e27b85db9403cac (diff) | |
Add QWaylandApplication::xkbContext()
It is necessary for the apps that want to manually parse the stream of events
from wl_keyborad.
Change-Id: I8229ae6e43640d0e7b9597f5f7b35cba59db0f64
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandnativeinterface.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index e1586d2446f..c7ecd8a2816 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp @@ -64,6 +64,11 @@ void *QWaylandNativeInterface::nativeResourceForIntegration(const QByteArray &re return touch->wl_touch(); return nullptr; } +#if QT_CONFIG(xkbcommon) + if (lowerCaseResource == "xkb_context") { + return m_integration->display()->xkbContext(); + } +#endif if (lowerCaseResource == "serial") return reinterpret_cast<void *>(quintptr(m_integration->display()->defaultInputDevice()->serial())); @@ -126,6 +131,13 @@ wl_seat *QtWaylandClient::QWaylandNativeInterface::lastInputSeat() const return nullptr; } +#if QT_CONFIG(xkbcommon) +struct xkb_context *QtWaylandClient::QWaylandNativeInterface::xkbContext() const +{ + return m_integration->display()->xkbContext(); +} +#endif + void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) { QByteArray lowerCaseResource = resourceString.toLower(); |
