Disable translucency when KDDW_NO_TRANSLUCENCY env var is set

Useful for running on weird window managers which don't support
transparent windows.
This commit is contained in:
Sergio Martins
2021-06-25 14:31:00 +01:00
parent 47ef203643
commit ec681e99ca
2 changed files with 5 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
for drop indicators while dragging.
- Fixed embedding the main window into a non-kddw main window (#204, #168)
- Fixed crash with an MFC application
- Allows to disable translucency via the KDDW_NO_TRANSLUCENCY env var, useful
in case running on weird Window Managers.
* v1.3.2 (unreleased)
-

View File

@@ -131,6 +131,9 @@ inline void activateWindow(QWindow *window)
inline bool windowManagerHasTranslucency()
{
if (qEnvironmentVariableIsSet("KDDW_NO_TRANSLUCENCY"))
return false;
#ifdef QT_X11EXTRAS_LIB
if (qApp->platformName() == QLatin1String("xcb"))
return QX11Info::isCompositingManagerRunning();