From 7cf59cf45592c7b0363c4e9574a64cef7bb51350 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 14 May 2024 11:11:19 +0000 Subject: [PATCH] Revert "Revert "QWaylandDisplay: Allow software-only deco and don't init GL needlessly"" This reverts commit ddb35b21ee48ca72808d5bcd865edd4ba64d75e8. Reason for revert: Cause for test failure has likely been addressed by 38ac95c03b423a063d095aaa4e3254a43f97c49b Fixes: QTBUG-124284 Fixes: QTBUG-124285 Change-Id: Iedeb1d2800951e549fe4a4846aaaa477cfa497ae Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/wayland/qwaylanddisplay.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 9bd60e74129..e6ed0772fa4 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -891,7 +891,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; }