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.
nextcloud-client/xcb_3.3.6.patch

30 lines
811 B

--- desktop-3.3.6-orig/src/gui/main.cpp 2021-10-31 10:39:15.179363699 -0400
+++ desktop-3.3.6/src/gui/main.cpp 2021-10-31 10:40:48.443965726 -0400
@@ -49,8 +49,26 @@
.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)
{
+
+#ifdef Q_OS_LINUX
+wayland_hacks();
+#endif
+
#ifdef Q_OS_WIN
SetDllDirectory(L"");
#endif