summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 265f0bb3f..f78bf2dd2 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -34,7 +34,6 @@
#include "qwaylandshellintegration_p.h"
#include "qwaylandclientbufferintegration_p.h"
-#include "qwaylandextendedsurface_p.h"
#include "qwaylandpointergestures_p.h"
#include "qwaylandsubsurface_p.h"
#include "qwaylandtouch_p.h"
@@ -312,7 +311,7 @@ QWaylandClientBufferIntegration * QWaylandDisplay::clientBufferIntegration() con
QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() const
{
- return mWindowManagerIntegration.data();
+ return mGlobals.windowManagerIntegration.get();
}
QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
@@ -335,8 +334,6 @@ void QWaylandDisplay::setupConnection()
struct ::wl_registry *registry = wl_display_get_registry(mDisplay);
init(registry);
- mWindowManagerIntegration.reset(new QWaylandWindowManagerIntegration(this));
-
#if QT_CONFIG(xkbcommon)
mXkbContext.reset(xkb_context_new(XKB_CONTEXT_NO_FLAGS));
if (!mXkbContext)
@@ -373,7 +370,6 @@ QWaylandDisplay::~QWaylandDisplay(void)
// Reset the globals manually since they need to be destroyed before the wl_display
mGlobals = {};
- mWindowManagerIntegration.reset();
if (object())
wl_registry_destroy(object());
@@ -645,10 +641,6 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
} else if (interface == QLatin1String(QWaylandDataDeviceManager::interface()->name)) {
mGlobals.dndSelectionHandler.reset(new QWaylandDataDeviceManager(this, version, id));
#endif
- } else if (interface == QLatin1String(QtWayland::qt_surface_extension::interface()->name)) {
- mGlobals.surfaceExtension.reset(
- new WithDestructor<QtWayland::qt_surface_extension, qt_surface_extension_destroy>(
- registry, id, 1));
} else if (interface == QLatin1String(QtWayland::wl_subcompositor::interface()->name)) {
mGlobals.subCompositor.reset(
new WithDestructor<QtWayland::wl_subcompositor, wl_subcompositor_destroy>(registry,
@@ -781,6 +773,9 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
mGlobals.xdgToplevelDragManager.reset(
new WithDestructor<QtWayland::xdg_toplevel_drag_manager_v1,
xdg_toplevel_drag_manager_v1_destroy>(registry, id, 1));
+ } else if (interface == QLatin1String(QtWayland::qt_windowmanager::interface()->name)) {
+ mGlobals.windowManagerIntegration.reset(
+ new QWaylandWindowManagerIntegration(this, id, version));
}
mRegistryGlobals.append(RegistryGlobal(id, interface, version, registry));
@@ -891,7 +886,12 @@ bool QWaylandDisplay::supportsWindowDecoration() const
if (disabled)
return false;
- static bool integrationSupport = clientBufferIntegration() && clientBufferIntegration()->supportsWindowDecoration();
+ // Don't initialize client buffer integration just to check whether it can have a decoration.
+ if (!mWaylandIntegration->mClientBufferIntegrationInitialized)
+ return true;
+
+ // We can do software-rendered decorations, only disable them if the integration explicitly says it can't.
+ static bool integrationSupport = !clientBufferIntegration() || clientBufferIntegration()->supportsWindowDecoration();
return integrationSupport;
}