From 70a8d2bc6883ad96fe5430300f9d825584b3233b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 11 Apr 2022 01:07:10 +0400 Subject: Client: Expose default input device's serial through integration Default input device is not so useful without serial for calls like xdg_toplevel_show_window_menu This is done in the same way as apptime/appusertime/gettimestamp in xcb's native interface. Change-Id: I20e7dee19cf20e819a557e23c539066945cecb46 Reviewed-by: David Edmundson (cherry picked from commit 1d8879f09367aeac9d43e9310e9871f2dd046aec) Reviewed-by: Qt Cherry-pick Bot --- src/client/qwaylandnativeinterface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp index 2c9ba899..f8ae07aa 100644 --- a/src/client/qwaylandnativeinterface.cpp +++ b/src/client/qwaylandnativeinterface.cpp @@ -98,6 +98,8 @@ void *QWaylandNativeInterface::nativeResourceForIntegration(const QByteArray &re return touch->wl_touch(); return nullptr; } + if (lowerCaseResource == "serial") + return reinterpret_cast(quintptr(m_integration->display()->defaultInputDevice()->serial())); return nullptr; } -- cgit v1.2.1