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.patch

29 lines
909 B

diff -urNr desktop-3.2.1-orig/src/gui/main.cpp desktop-3.2.1/src/gui/main.cpp
--- desktop-3.2.1-orig/src/gui/main.cpp 2021-04-28 09:38:14.000000000 +0200
+++ desktop-3.2.1/src/gui/main.cpp 2021-05-01 16:09:04.898807958 +0200
@@ -49,8 +49,25 @@
.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
Q_INIT_RESOURCE(resources);
Q_INIT_RESOURCE(theme);