1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:58:14 +00:00

WindowServer: Add IPC calls for changing the cursor highlighting

This commit is contained in:
MacDue 2022-06-04 20:38:54 +01:00 committed by Linus Groh
parent 29d8ec1b18
commit 5fc13e1d53
3 changed files with 31 additions and 0 deletions

View file

@ -809,6 +809,26 @@ void ConnectionFromClient::apply_cursor_theme(String const& name)
WindowManager::the().apply_cursor_theme(name);
}
void ConnectionFromClient::set_cursor_highlight_radius(int radius)
{
WindowManager::the().set_cursor_highlight_radius(radius);
}
Messages::WindowServer::GetCursorHighlightRadiusResponse ConnectionFromClient::get_cursor_highlight_radius()
{
return WindowManager::the().cursor_highlight_radius();
}
void ConnectionFromClient::set_cursor_highlight_color(Gfx::Color const& color)
{
WindowManager::the().set_cursor_highlight_color(color);
}
Messages::WindowServer::GetCursorHighlightColorResponse ConnectionFromClient::get_cursor_highlight_color()
{
return WindowManager::the().cursor_highlight_color();
}
Messages::WindowServer::GetCursorThemeResponse ConnectionFromClient::get_cursor_theme()
{
auto config = Core::ConfigFile::open("/etc/WindowServer.ini").release_value_but_fixme_should_propagate_errors();

View file

@ -143,6 +143,10 @@ private:
virtual Messages::WindowServer::SetSystemThemeResponse set_system_theme(String const&, String const&, bool keep_desktop_background) override;
virtual Messages::WindowServer::GetSystemThemeResponse get_system_theme() override;
virtual void apply_cursor_theme(String const&) override;
virtual void set_cursor_highlight_radius(int radius) override;
virtual Messages::WindowServer::GetCursorHighlightRadiusResponse get_cursor_highlight_radius() override;
virtual void set_cursor_highlight_color(Gfx::Color const& color) override;
virtual Messages::WindowServer::GetCursorHighlightColorResponse get_cursor_highlight_color() override;
virtual Messages::WindowServer::GetCursorThemeResponse get_cursor_theme() override;
virtual Messages::WindowServer::SetSystemFontsResponse set_system_fonts(String const&, String const&) override;
virtual void set_window_base_size_and_size_increment(i32, Gfx::IntSize const&, Gfx::IntSize const&) override;

View file

@ -1,5 +1,6 @@
#include <LibCore/AnonymousBuffer.h>
#include <LibGfx/ShareableBitmap.h>
#include <LibGfx/Color.h>
endpoint WindowServer
{
@ -131,6 +132,12 @@ endpoint WindowServer
apply_cursor_theme(String name) =|
get_cursor_theme() => (String name)
set_cursor_highlight_radius(int radius) =|
get_cursor_highlight_radius() => (int radius)
set_cursor_highlight_color(Gfx::Color color) =|
get_cursor_highlight_color() => (Gfx::Color color)
set_system_fonts(String default_font_query, String fixed_width_font_query) => (bool success)
set_window_base_size_and_size_increment(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) =|