diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2021-12-02 09:59:09 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2021-12-09 13:57:23 +0100 |
commit | f13fd0b32c94b8b35c3d7bd702552e012a7e526e (patch) | |
tree | 7eee0d4be55c48a8cc16bf478241ba8b062c00ee /src/client/shellintegration | |
parent | 39e3290efa2dd40722fa3322284cae3b01ccedf4 (diff) | |
download | qtwayland-f13fd0b32c94b8b35c3d7bd702552e012a7e526e.tar.gz |
Remove QWaylandShellIntegration::findGlobal
This is no longer necessary now that the recommended way of creating
custom shells is to use QWaylandShellIntegrationTemplate. This also
restores the old internal API in use by existing shells.
Task-number: QTBUG-94330
Change-Id: I0fa0ba0d928baa2edf5d68e879558081026436c8
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/shellintegration')
-rw-r--r-- | src/client/shellintegration/qwaylandshellintegration.cpp | 13 | ||||
-rw-r--r-- | src/client/shellintegration/qwaylandshellintegration_p.h | 13 |
2 files changed, 2 insertions, 24 deletions
diff --git a/src/client/shellintegration/qwaylandshellintegration.cpp b/src/client/shellintegration/qwaylandshellintegration.cpp index 7bc37792..5bb61703 100644 --- a/src/client/shellintegration/qwaylandshellintegration.cpp +++ b/src/client/shellintegration/qwaylandshellintegration.cpp @@ -39,19 +39,6 @@ wl_surface *QWaylandShellIntegration::wlSurfaceForWindow(QWaylandWindow *window) return window->wlSurface(); } -bool QWaylandShellIntegration::findGlobal(const QString &interface, wl_registry **registry, uint32_t *id, uint32_t *version) -{ - for (QWaylandDisplay::RegistryGlobal &global : m_display->globals()) { - if (global.interface == interface) { - *registry = m_display->wl_registry(); - *id = global.id; - *version = global.version; - return true; - } - } - return false; -} - } QT_END_NAMESPACE diff --git a/src/client/shellintegration/qwaylandshellintegration_p.h b/src/client/shellintegration/qwaylandshellintegration_p.h index 4de19e78..8acbf967 100644 --- a/src/client/shellintegration/qwaylandshellintegration_p.h +++ b/src/client/shellintegration/qwaylandshellintegration_p.h @@ -77,13 +77,7 @@ public: QWaylandShellIntegration() {} virtual ~QWaylandShellIntegration() {} - bool initialize(QWaylandDisplay *display) { - m_display = display; - return initialize(); - } - virtual bool initialize() { - return false; - } + virtual bool initialize(QWaylandDisplay *display) = 0; virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0; virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) { Q_UNUSED(resource); @@ -92,10 +86,7 @@ public: } static wl_surface *wlSurfaceForWindow(QWaylandWindow *window); - bool findGlobal(const QString &interface, wl_registry **registry, uint32_t *id, uint32_t *version); -protected: - QWaylandDisplay *m_display = nullptr; }; template <typename T> @@ -107,7 +98,7 @@ public: { } - bool initialize() override + bool initialize(QWaylandDisplay *) override { QWaylandClientExtension::initialize(); return isActive(); |