From 555fd6e1e1f9ecdabe0203c093a7b45f75ae9784 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 7 Sep 2024 06:10:12 +0400 Subject: [PATCH] Client: Fix desktop environment check for decorations XDG_CURRENT_DESKTOP is an array and the current check doesn't work on e.g. Ubuntu Pick-to: 6.8 Change-Id: Iff049ad8dd432191f815c6c079448af02dc7a09a Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index ef4dfba743d..e43f8a274d7 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -1087,8 +1087,8 @@ bool QWaylandWindow::createDecoration() if (targetKey.isEmpty()) { auto unixServices = dynamic_cast( QGuiApplicationPrivate::platformIntegration()->services()); - const QByteArray currentDesktop = unixServices->desktopEnvironment(); - if (currentDesktop == "GNOME") { + const QList desktopNames = unixServices->desktopEnvironment().split(':'); + if (desktopNames.contains("GNOME")) { if (decorations.contains("adwaita"_L1)) targetKey = "adwaita"_L1; else if (decorations.contains("gnome"_L1))