1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

WindowServer: Add IPC calls for controlling cursor theme

This commit adds two new IPC calls for WindowServer: apply_cursor_theme
and get_cursor_theme.
This commit is contained in:
Maciej Zygmanowski 2021-08-01 17:23:31 +02:00 committed by Andreas Kling
parent 040a723f1f
commit 0363cd3d55
3 changed files with 17 additions and 0 deletions

View file

@ -758,6 +758,18 @@ Messages::WindowServer::GetSystemThemeResponse ClientConnection::get_system_them
return name;
}
void ClientConnection::apply_cursor_theme(String const& name)
{
WindowManager::the().apply_cursor_theme(name);
}
Messages::WindowServer::GetCursorThemeResponse ClientConnection::get_cursor_theme()
{
auto config = Core::ConfigFile::open("/etc/WindowServer.ini");
auto name = config->read_entry("Mouse", "CursorTheme");
return name;
}
Messages::WindowServer::SetSystemFontsResponse ClientConnection::set_system_fonts(String const& default_font_query, String const& fixed_width_font_query)
{
if (!Gfx::FontDatabase::the().get_by_name(default_font_query)