Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
334 stars 59 forks source link

Disable the wayland backend on Linux by default #208

Closed Spike29 closed 4 months ago

Spike29 commented 4 months ago

The viewports are currently not usable on Wayland: QT WRN qt.qpa.wayland: Setting cursor position is not possible on wayland

With this change, the X11 (Xwayland) backend is always used instead, no need to manually set the QT_QPA_PLATFORM=xcb environment variable before starting NRC.

It kinda fixes #126

Sorry if this is not the right place to put this code, I'm not familiar with C++ :>

The same thing (with a GTK environment variable) exists in NetRadiant and DarkRadiant: https://gitlab.com/xonotic/netradiant/-/blob/master/radiant/main.cpp?ref_type=heads#L540 https://github.com/codereader/DarkRadiant/commit/cbda48384c3b2ced6412812ecd1a25440541c89e

Garux commented 4 months ago

Good idea to have this 'automated', thank you.