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 <qt@david-redondo.de>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2024-04-11 09:41:48 +02:00
parent a3f4b0671f
commit ddb35b21ee

View File

@ -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;
}