summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-04-29 19:49:52 +0100
committerAndreas Kling <kling@serenityos.org>2022-05-12 13:10:49 +0200
commit6ba03dec35959de93f7a076bb952f23397d60d83 (patch)
treef07668bcec8755c05839b494aaeba1f4e3ae5f3d /Userland
parentc7d038cc260417028aa7570a039a3a6efb9a1811 (diff)
downloadserenity-6ba03dec35959de93f7a076bb952f23397d60d83.zip
WindowServer: Save config file when mouse cursor theme is changed
When user code requests the current cursor theme name with `GUI::ConnectionToWindowServer::the().get_cursor_theme()`, that reads the name from the config file. If we don't write that out when it's changed, then users get given an outdated cursor theme instead of the current one. In particular, changing the theme in MouseSettings, saving and closing it, then reopening MouseSettings, would show the wrong theme selected. So, that's fixed now. :^)
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Services/WindowServer/WindowManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp
index 41015015d2..912cd4dbf5 100644
--- a/Userland/Services/WindowServer/WindowManager.cpp
+++ b/Userland/Services/WindowServer/WindowManager.cpp
@@ -2260,6 +2260,9 @@ void WindowManager::apply_cursor_theme(String const& theme_name)
Compositor::the().invalidate_cursor();
m_config->write_entry("Mouse", "CursorTheme", theme_name);
+ if (auto result = m_config->sync(); result.is_error()) {
+ dbgln("Failed to save config file: {}", result.error());
+ }
}
}