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/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp | |
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/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp')
-rw-r--r-- | src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp b/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp index 225ee61f..568599c6 100644 --- a/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp +++ b/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp @@ -56,31 +56,13 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { QWaylandQtShellIntegration::QWaylandQtShellIntegration() + : QWaylandShellIntegrationTemplate(1) { } -bool QWaylandQtShellIntegration::initialize() -{ - if (m_qtShell) - return true; - wl_registry *registry; - uint32_t id; - uint32_t version; - bool found = findGlobal(QLatin1String("zqt_shell_v1"), ®istry, &id, &version); - if (!found) { - qCDebug(lcQpaWayland) << "Couldn't find global zqt_shell_v1 for qt-shell"; - return false; - } - m_qtShell.reset(new QtWayland::zqt_shell_v1(registry, id, version)); - return true; -} - QWaylandShellSurface *QWaylandQtShellIntegration::createShellSurface(QWaylandWindow *window) { - if (!m_qtShell) - return nullptr; - - auto *surface = m_qtShell->surface_create(wlSurfaceForWindow(window)); + auto *surface = surface_create(wlSurfaceForWindow(window)); return new QWaylandQtSurface(surface, window); } |