summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2022-04-11 01:07:10 +0400
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-09 14:28:14 +0000
commit70a8d2bc6883ad96fe5430300f9d825584b3233b (patch)
tree824cc8e17d3c35f669b7e37fb3aace75ced29c3d
parentdf5d6cb2ad6be6cb4df0cdc34eaa1367993554ff (diff)
downloadqtwayland-70a8d2bc6883ad96fe5430300f9d825584b3233b.tar.gz
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 <davidedmundson@kde.org> (cherry picked from commit 1d8879f09367aeac9d43e9310e9871f2dd046aec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandnativeinterface.cpp2
1 files changed, 2 insertions, 0 deletions
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<void *>(quintptr(m_integration->display()->defaultInputDevice()->serial()));
return nullptr;
}