summaryrefslogtreecommitdiff
path: root/src/client/qwaylandnativeinterface.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-05-09 22:57:53 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-05-18 09:37:07 +0000
commit42f71e680c6146526fb18116b1b98995543443c0 (patch)
tree465f50e000788cd699f7cbf3425c9404abea4712 /src/client/qwaylandnativeinterface.cpp
parent9ac2cdf96d36db9612effdbdb9669bd413b66b84 (diff)
downloadqtwayland-42f71e680c6146526fb18116b1b98995543443c0.tar.gz
Move wl-shell to a plugin
[ChangeLog][QPA plugin] The wl-shell shell integration has been moved to a plugin. This also adds API so shell integrations can return native resources for windows, as it was needed in order to continue to supporting wl_shell_surface. Change-Id: Ibc68ffcc5b0c6993d8f4e078f663e4d67340e1a5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/client/qwaylandnativeinterface.cpp')
-rw-r--r--src/client/qwaylandnativeinterface.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp
index 9946c323..76acb526 100644
--- a/src/client/qwaylandnativeinterface.cpp
+++ b/src/client/qwaylandnativeinterface.cpp
@@ -40,13 +40,13 @@
#include "qwaylandnativeinterface_p.h"
#include "qwaylanddisplay_p.h"
#include "qwaylandwindow_p.h"
+#include "qwaylandshellintegration_p.h"
#include "qwaylandsubsurface_p.h"
#include "qwaylandextendedsurface_p.h"
#include "qwaylandintegration_p.h"
#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>
@@ -91,18 +91,13 @@ void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourc
QWaylandWindow *w = static_cast<QWaylandWindow*>(window->handle());
return w ? w->object() : nullptr;
}
- if (lowerCaseResource == "wl_shell_surface") {
- QWaylandWindow *w = static_cast<QWaylandWindow*>(window->handle());
- if (!w)
- return nullptr;
- QWaylandWlShellSurface *s = qobject_cast<QWaylandWlShellSurface *>(w->shellSurface());
- if (!s)
- return nullptr;
- return s->object();
- }
+
if (lowerCaseResource == "egldisplay" && m_integration->clientBufferIntegration())
return m_integration->clientBufferIntegration()->nativeResource(QWaylandClientBufferIntegration::EglDisplay);
+ if (auto shellIntegration = m_integration->shellIntegration())
+ return shellIntegration->nativeResourceForWindow(resourceString, window);
+
return nullptr;
}