summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2015-10-28 13:14:35 +0100
committerMartin Gräßlin <mgraesslin@kde.org>2015-10-30 08:59:19 +0000
commit257519ce8a6fc225e04313ae27cd63643b75f0fd (patch)
tree6f6201741c6de4beb1757666b8b3e20b4d088795
parentbd21beea9a433a8878c0e719a7bfb8c14df47840 (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>
-rw-r--r--src/client/qwaylandnativeinterface.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp
index 0d20075f0..98e1a7366 100644
--- a/src/client/qwaylandnativeinterface.cpp
+++ b/src/client/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);