From df22d2ac31ad4a8b8e40208ffefc37fcd1e64dd8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 4 Nov 2015 13:21:37 +0100 Subject: [PATCH] add a static PlasmaShellSurfaceInterface::get(wl_resource*) to get the associated plasmashell surface from anywhere having the associated resource --- src/wayland/plasmashell_interface.cpp | 5 +++++ src/wayland/plasmashell_interface.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/wayland/plasmashell_interface.cpp b/src/wayland/plasmashell_interface.cpp index d29d7bc227..1b10f3ce89 100644 --- a/src/wayland/plasmashell_interface.cpp +++ b/src/wayland/plasmashell_interface.cpp @@ -320,5 +320,10 @@ bool PlasmaShellSurfaceInterface::skipTaskbar() const return d->m_skipTaskbar; } +PlasmaShellSurfaceInterface *PlasmaShellSurfaceInterface::get(wl_resource *native) +{ + return Private::get(native); +} + } } diff --git a/src/wayland/plasmashell_interface.h b/src/wayland/plasmashell_interface.h index 9db3f529f0..eca7f39089 100644 --- a/src/wayland/plasmashell_interface.h +++ b/src/wayland/plasmashell_interface.h @@ -136,6 +136,12 @@ public: */ bool skipTaskbar() const; + /** + * @returns The PlasmaShellSurfaceInterface for the @p native resource. + * @since 5.5 + **/ + static PlasmaShellSurfaceInterface *get(wl_resource *native); + Q_SIGNALS: /** * A change of global position has been requested.