summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2024-01-11 20:54:34 +0100
committerKai Uwe Broulik <kde@privat.broulik.de>2024-04-02 07:40:59 +0100
commit3652666c559382f6d575fa4102e132b71a58785f (patch)
tree0512fe7eb5963dd7349f93759d88286c9896e404 /src
parentfe29b73c34c3c854df28b3c574df022080cefba3 (diff)
QWaylandDisplay: Allow software-only deco and don't init GL needlessly
Don't initialize the client buffer integration just to check whether it can do a decoration. If we had a GL window, it would have initialized GL already. Also, we can do software-rendered decorations nowadays, only disable them if the integration explicitly says it can't. Change-Id: I396d32796a10ccffd6ef3bb0c5eaa3a1078b8d79 Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylanddisplay.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 265f0bb3f..07fbe0b41 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/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;
}