From 7fd8bc5633d14d6dd148e50646db1494a0728ee1 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Tue, 4 Nov 2025 20:42:52 +0100 Subject: [PATCH] Fix GLFW version check for X11 on Gnome desktop initialization --- src/RenderingManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RenderingManager.cpp b/src/RenderingManager.cpp index e2ff56b..822595e 100644 --- a/src/RenderingManager.cpp +++ b/src/RenderingManager.cpp @@ -437,6 +437,7 @@ Rendering::Rendering() bool Rendering::init() { +#if GLFW_VERSION_MAJOR > 2 && GLFW_VERSION_MINOR > 3 // Forcing X11 on Gnome makes the server use xWayland which has proper Server Side Decorations as opposed to Wayland. if (strcmp(getenv("XDG_CURRENT_DESKTOP"), "GNOME") == 0 || strcmp(getenv("XDG_CURRENT_DESKTOP"), "Unity") == 0 ){ @@ -447,7 +448,7 @@ bool Rendering::init() g_printerr("Detected %s desktop\n", getenv("XDG_CURRENT_DESKTOP")); glfwInitHint(GLFW_PLATFORM, GLFW_ANY_PLATFORM); } - +#endif // // Setup GLFW //