You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
887 B
29 lines
887 B
3 years ago
|
diff -ruN desktop-3.4.1-orig/src/gui/main.cpp desktop-3.4.1/src/gui/main.cpp
|
||
|
--- desktop-3.4.1-orig/src/gui/main.cpp 2021-12-17 07:52:51.000000000 -0800
|
||
|
+++ desktop-3.4.1/src/gui/main.cpp 2022-01-15 14:02:39.460156432 -0800
|
||
|
@@ -56,8 +56,24 @@
|
||
4 years ago
|
.arg(Theme::instance()->appNameGUI()));
|
||
|
}
|
||
|
|
||
|
+#ifdef Q_OS_LINUX
|
||
|
+void wayland_hacks()
|
||
|
+{
|
||
|
+ QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
|
||
|
+ QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
|
||
|
+ QByteArray sessionType = qgetenv("XDG_SESSION_TYPE").toLower();
|
||
|
+ if (sessionType.contains("wayland") && (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")))
|
||
|
+ {
|
||
|
+ qputenv("QT_QPA_PLATFORM", "xcb");
|
||
|
+ }
|
||
|
+}
|
||
|
+#endif
|
||
|
+
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
3 years ago
|
+#ifdef Q_OS_LIUX
|
||
|
+ wayland_hacks();
|
||
3 years ago
|
+#endif
|
||
3 years ago
|
#ifdef Q_OS_WIN
|
||
|
SetDllDirectory(L"");
|
||
|
#endif
|