diff options
| author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-05-09 22:57:53 +0200 |
|---|---|---|
| committer | Johan Helsing <johan.helsing@qt.io> | 2018-05-18 09:37:07 +0000 |
| commit | d8e37e4b03f9c786e1cb3dda80b050f05f974752 (patch) | |
| tree | ddbb33f0d88c0ca36efdb6a8098198ab330e9e5d /src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | |
| parent | ae584145306a95e331b3ea377805848946b83341 (diff) | |
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/plugins/platforms/wayland/qwaylandnativeinterface.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index 9946c323567..76acb526bf3 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/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; } |
