diff --git a/glfw/linux_desktop_settings.c b/glfw/linux_desktop_settings.c index 8bc96a48f..a15b74ac8 100644 --- a/glfw/linux_desktop_settings.c +++ b/glfw/linux_desktop_settings.c @@ -111,7 +111,9 @@ HANDLER(process_desktop_settings) if (!dbus_message_iter_next(&array)) break; } #undef die +#ifndef _GLFW_X11 if (cursor_theme_changed) _glfwPlatformChangeCursorTheme(); +#endif } #undef HANDLER @@ -124,8 +126,7 @@ read_desktop_settings(DBusConnection *session_bus) { dbus_message_iter_init_append(msg, &iter); if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "s", &array_iter)) { return false; } if (!dbus_message_iter_close_container(&iter, &array_iter)) { return false; } - bool ok = call_method_with_msg(session_bus, msg, DBUS_TIMEOUT_USE_DEFAULT, process_desktop_settings, NULL); - return ok; + return call_method_with_msg(session_bus, msg, DBUS_TIMEOUT_USE_DEFAULT, process_desktop_settings, NULL); } void diff --git a/glfw/source-info.json b/glfw/source-info.json index 165c95335..89d29f170 100644 --- a/glfw/source-info.json +++ b/glfw/source-info.json @@ -144,6 +144,7 @@ "linux_joystick.h", "null_joystick.h", "linux_notify.h", + "linux_desktop_settings.h", "main_loop.h" ], "sources": [ @@ -160,6 +161,7 @@ "backend_utils.c", "linux_joystick.c", "null_joystick.c", + "linux_desktop_settings.c", "linux_notify.c" ] } diff --git a/glfw/x11_init.c b/glfw/x11_init.c index f290051ee..cbf47c598 100644 --- a/glfw/x11_init.c +++ b/glfw/x11_init.c @@ -30,6 +30,7 @@ #define _GNU_SOURCE #include "internal.h" #include "backend_utils.h" +#include "linux_desktop_settings.h" #include @@ -648,6 +649,7 @@ int _glfwPlatformInit(void) "X11: Failed to initialize event loop data"); } glfw_dbus_init(&_glfw.x11.dbus, &_glfw.x11.eventLoopData); + glfw_initialize_desktop_settings(); // needed for color scheme change notification _glfw.x11.screen = DefaultScreen(_glfw.x11.display); _glfw.x11.root = RootWindow(_glfw.x11.display, _glfw.x11.screen);