File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,24 @@ int waitAfterConnecting(int delay, QCoreApplication& app)
51
51
return app.exec ();
52
52
}
53
53
54
- int main (int argc, char * argv[])
54
+ // source: https://github.com/ksnip/ksnip/issues/416
55
+ void wayland_hacks ()
55
56
{
57
+ // Workaround to https://github.com/ksnip/ksnip/issues/416
58
+ QByteArray currentDesktop = qgetenv (" XDG_CURRENT_DESKTOP" ).toLower ();
59
+ QByteArray sessionDesktop = qgetenv (" XDG_SESSION_DESKTOP" ).toLower ();
60
+ QByteArray sessionType = qgetenv (" XDG_SESSION_TYPE" ).toLower ();
61
+ if (sessionType.contains (" wayland" ) && (currentDesktop.contains (" gnome" ) ||
62
+ sessionDesktop.contains (" gnome" ))) {
63
+ qputenv (" QT_QPA_PLATFORM" , " xcb" );
64
+ }
65
+ }
56
66
67
+ int main (int argc, char * argv[])
68
+ {
69
+ #ifdef Q_OS_LINUX
70
+ wayland_hacks ();
71
+ #endif
57
72
spdlog::set_level (spdlog::level::debug); // Set global log level to debug
58
73
spdlog::set_pattern (" [source %s] [function %!] [line %#] %v" );
59
74
You can’t perform that action at this time.
0 commit comments