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 <davidedmundson@kde.org>
This commit is contained in:
Ilya Fedin 2024-09-07 06:10:12 +04:00
parent 5384317da8
commit 555fd6e1e1

View File

@ -1087,8 +1087,8 @@ bool QWaylandWindow::createDecoration()
if (targetKey.isEmpty()) {
auto unixServices = dynamic_cast<QGenericUnixServices *>(
QGuiApplicationPrivate::platformIntegration()->services());
const QByteArray currentDesktop = unixServices->desktopEnvironment();
if (currentDesktop == "GNOME") {
const QList<QByteArray> desktopNames = unixServices->desktopEnvironment().split(':');
if (desktopNames.contains("GNOME")) {
if (decorations.contains("adwaita"_L1))
targetKey = "adwaita"_L1;
else if (decorations.contains("gnome"_L1))