diff options
| author | Martin Gräßlin <mgraesslin@kde.org> | 2015-10-28 13:14:35 +0100 |
|---|---|---|
| committer | Martin Gräßlin <mgraesslin@kde.org> | 2015-10-30 08:59:19 +0000 |
| commit | eace7fb3ad7417fb285cc8c6672856b419f6e46a (patch) | |
| tree | b34633f5a8711f38e0c2bfccaaf50baebd0a009c /src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | |
| parent | face687a6204a8f41b0bbe26de1e42c9dc7cb7e0 (diff) | |
Add wl_shell_surface as nativeResourceForWindow
Allows to get the wl_shell_surface for a QWindow, if it exists.
Change-Id: I16b1c578a1c605e58c96e94ae55a3331ecfa353d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandnativeinterface.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index 0d20075f05d..98e1a73668b 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp @@ -39,6 +39,7 @@ #include "qwaylanddisplay_p.h" #include "qwaylandwindowmanagerintegration_p.h" #include "qwaylandscreen_p.h" +#include "qwaylandwlshellsurface_p.h" #include <QtGui/private/qguiapplication_p.h> #include <QtGui/QScreen> #include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h> @@ -80,6 +81,15 @@ void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourc if (lowerCaseResource == "surface") { return ((QWaylandWindow *) window->handle())->object(); } + if (lowerCaseResource == "wl_shell_surface") { + QWaylandWindow *w = (QWaylandWindow *) window->handle(); + if (!w) + return NULL; + QWaylandWlShellSurface *s = qobject_cast<QWaylandWlShellSurface *>(w->shellSurface()); + if (!s) + return NULL; + return s->object(); + } if (lowerCaseResource == "egldisplay" && m_integration->clientBufferIntegration()) return m_integration->clientBufferIntegration()->nativeResource(QWaylandClientBufferIntegration::EglDisplay); |
