Blame SOURCES/qtwayland-use-gnome-platform-theme-on-gnome-based-desktops.patch

e455a7
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
e455a7
index 97e0203c..5bee160a 100644
e455a7
--- a/src/client/qwaylandintegration.cpp
e455a7
+++ b/src/client/qwaylandintegration.cpp
e455a7
@@ -99,20 +99,26 @@ public:
e455a7
 
e455a7
         if (QGuiApplication::desktopSettingsAware()) {
e455a7
             const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
e455a7
-
e455a7
+            QList<QByteArray> gtkBasedEnvironments;
e455a7
+            gtkBasedEnvironments << "GNOME"
e455a7
+                                 << "X-CINNAMON"
e455a7
+                                 << "UNITY"
e455a7
+                                 << "MATE"
e455a7
+                                 << "XFCE"
e455a7
+                                 << "LXDE";
e455a7
             if (desktopEnvironment == QByteArrayLiteral("KDE")) {
e455a7
 #if QT_CONFIG(settings)
e455a7
                 result.push_back(QStringLiteral("kde"));
e455a7
 #endif
e455a7
-            } else if (!desktopEnvironment.isEmpty() &&
e455a7
-                desktopEnvironment != QByteArrayLiteral("UNKNOWN") &&
e455a7
-                desktopEnvironment != QByteArrayLiteral("GNOME") &&
e455a7
-                desktopEnvironment != QByteArrayLiteral("UNITY") &&
e455a7
-                desktopEnvironment != QByteArrayLiteral("MATE") &&
e455a7
-                desktopEnvironment != QByteArrayLiteral("XFCE") &&
e455a7
-                desktopEnvironment != QByteArrayLiteral("LXDE"))
e455a7
+            } else if (gtkBasedEnvironments.contains(desktopEnvironment)) {
e455a7
+                // prefer the GTK3 theme implementation with native dialogs etc.
e455a7
+                result.push_back(QStringLiteral("gtk3"));
e455a7
+                // fallback to the generic Gnome theme if loading the GTK3 theme fails
e455a7
+                result.push_back(QLatin1String(QGnomeTheme::name));
e455a7
+            } else if (!desktopEnvironment.isEmpty() && desktopEnvironment != QByteArrayLiteral("UNKNOWN")) {
e455a7
                 // Ignore X11 desktop environments
e455a7
                 result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower()));
e455a7
+            }
e455a7
         }
e455a7
 
e455a7
         if (result.isEmpty())