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

31 lines
1.1 KiB

--- desktop-3.6.0-orig/src/gui/main.cpp 2022-09-14 20:07:40.359852434 -0500
+++ desktop-3.6.0/src/gui/main.cpp 2022-09-14 20:07:20.869331548 -0500
@@ -56,8 +56,27 @@
.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_LIUX
+ wayland_hacks();
+#endif
+
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu --no-sandbox");
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);