From cbda48384c3b2ced6412812ecd1a25440541c89e Mon Sep 17 00:00:00 2001 From: jonri Date: Fri, 22 Mar 2024 12:23:23 -0400 Subject: [PATCH] Force GDK backend to X11 on Linux --- radiant/RadiantApp.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/radiant/RadiantApp.cpp b/radiant/RadiantApp.cpp index a26c7aca19..4b63d43181 100644 --- a/radiant/RadiantApp.cpp +++ b/radiant/RadiantApp.cpp @@ -89,7 +89,15 @@ class RadiantApp::ArtProvider final: public wxArtProvider }; RadiantApp::RadiantApp() -{} +{ +#if defined(__linux__) + // The native Wayland backend for GTK does not implement the mouse pointer + // warping functions used in the FreezePointer class. Forcing the backend + // to X11 will let us run using XWayland which does provide emulation of + // this functionality. + setenv("GDK_BACKEND", "x11", 0); +#endif +} RadiantApp::~RadiantApp() {}