summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/wayland/qwaylandnativeinterface.cpp12
-rw-r--r--src/plugins/platforms/wayland/qwaylandnativeinterface_p.h3
2 files changed, 15 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();
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h
index ce8c6bec3fd..ab2a61597d4 100644
--- a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h
+++ b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h
@@ -62,6 +62,9 @@ public:
wl_touch *touch() const override;
uint lastInputSerial() const override;
wl_seat *lastInputSeat() const override;
+#if QT_CONFIG(xkbcommon)
+ struct xkb_context *xkbContext() const override;
+#endif
private:
static void setWindowMargins(QWindow *window, const QMargins &margins);