From ddb35b21ee48ca72808d5bcd865edd4ba64d75e8 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 11 Apr 2024 09:41:48 +0200 Subject: [PATCH] Revert "QWaylandDisplay: Allow software-only deco and don't init GL needlessly" This reverts commit aff3a43bf067656d326bb17f31ee097684213c22. This optimization causes flakiness in the xdgdecorationv1 test, possibly because it no longer handles the case where the supportsWindowDecoration() function is called before the buffer integration is initialized. So it unfortunately has to be reverted until a better approach can be figured out. Fixes: QTBUG-124259 Change-Id: I05f13a51b22b6779bffba531f08ebfd17a9afb38 Reviewed-by: David Redondo --- src/plugins/platforms/wayland/qwaylanddisplay.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 07fbe0b4105..265f0bb3f19 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -891,12 +891,7 @@ bool QWaylandDisplay::supportsWindowDecoration() const if (disabled) return false; - // 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(); + static bool integrationSupport = clientBufferIntegration() && clientBufferIntegration()->supportsWindowDecoration(); return integrationSupport; }