mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
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. :^)
This commit is contained in:
parent
c7d038cc26
commit
6ba03dec35
Notes:
sideshowbarker
2024-07-17 12:00:54 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/6ba03dec35 Pull-request: https://github.com/SerenityOS/serenity/pull/14006 Reviewed-by: https://github.com/MacDue
1 changed files with 3 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue