summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-06-04 20:38:54 +0100
committerLinus Groh <mail@linusgroh.de>2022-06-05 22:42:35 +0100
commit5fc13e1d53e014a17bea05fc1656d6b9de398b6d (patch)
tree168ee6c1754850b654a2fedbc920090ded0403c1 /Userland/Services
parent29d8ec1b18a49c518d5dd0c1cdef4d10078521b8 (diff)
downloadserenity-5fc13e1d53e014a17bea05fc1656d6b9de398b6d.zip
WindowServer: Add IPC calls for changing the cursor highlighting
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/WindowServer/ConnectionFromClient.cpp20
-rw-r--r--Userland/Services/WindowServer/ConnectionFromClient.h4
-rw-r--r--Userland/Services/WindowServer/WindowServer.ipc7
3 files changed, 31 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/ConnectionFromClient.cpp b/Userland/Services/WindowServer/ConnectionFromClient.cpp
index 6f3f642a7f..716dd1c862 100644
--- a/Userland/Services/WindowServer/ConnectionFromClient.cpp
+++ b/Userland/Services/WindowServer/ConnectionFromClient.cpp
@@ -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();
diff --git a/Userland/Services/WindowServer/ConnectionFromClient.h b/Userland/Services/WindowServer/ConnectionFromClient.h
index 7783621aef..3db7349bfe 100644
--- a/Userland/Services/WindowServer/ConnectionFromClient.h
+++ b/Userland/Services/WindowServer/ConnectionFromClient.h
@@ -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;
diff --git a/Userland/Services/WindowServer/WindowServer.ipc b/Userland/Services/WindowServer/WindowServer.ipc
index 8ac33007eb..54ed6d1a74 100644
--- a/Userland/Services/WindowServer/WindowServer.ipc
+++ b/Userland/Services/WindowServer/WindowServer.ipc
@@ -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) =|