diff options
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 264528f6c..3eac985f6 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -56,6 +56,7 @@ #include "qwaylandwindowmanagerintegration_p.h" #include "qwaylandshellintegration_p.h" +#include "qwaylandclientbufferintegration_p.h" #include "qwaylandextendedoutput_p.h" #include "qwaylandextendedsurface_p.h" @@ -335,4 +336,16 @@ QtWayland::xdg_shell *QWaylandDisplay::shellXdg() return mShellXdg.data(); } +bool QWaylandDisplay::supportsWindowDecoration() const +{ + static bool disabled = qgetenv("QT_WAYLAND_DISABLE_WINDOWDECORATION").toInt(); + // Stop early when disabled via the environment. Do not try to load the integration in + // order to play nice with SHM-only, buffer integration-less systems. + if (disabled) + return false; + + static bool integrationSupport = clientBufferIntegration() && clientBufferIntegration()->supportsWindowDecoration(); + return integrationSupport; +} + QT_END_NAMESPACE |