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>
This commit is contained in:
parent
face687a62
commit
eace7fb3ad
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user