xcb.patch 823 B

123456789101112131415161718192021222324252627282930
  1. --- desktop-3.2.2-orig/src/gui/main.cpp 2021-06-14 20:40:51.378471413 -0400
  2. +++ desktop-3.2.2/src/gui/main.cpp 2021-06-14 20:42:21.630180229 -0400
  3. @@ -49,8 +49,26 @@
  4. .arg(Theme::instance()->appNameGUI()));
  5. }
  6. +#ifdef Q_OS_LINUX
  7. +void wayland_hacks()
  8. +{
  9. + QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
  10. + QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
  11. + QByteArray sessionType = qgetenv("XDG_SESSION_TYPE").toLower();
  12. + if (sessionType.contains("wayland") && (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")))
  13. + {
  14. + qputenv("QT_QPA_PLATFORM", "xcb");
  15. + }
  16. +}
  17. +#endif
  18. +
  19. int main(int argc, char **argv)
  20. {
  21. +
  22. +#ifdef Q_OS_LINUX
  23. +wayland_hacks();
  24. +#endif
  25. +
  26. Q_INIT_RESOURCE(resources);
  27. Q_INIT_RESOURCE(theme);