mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibGUI+WindowServer: Create IPC calls for passing SystemEffects
SystemEffects are sent to the WindowManager through set_system_effects() and broadcast to Desktop clients with update_system_effects(). WindowManager is reponsible for saving, loading and rebroadcasting effects from WindowServer.ini on config changes.
This commit is contained in:
parent
e2318dffe3
commit
841d06f676
8 changed files with 71 additions and 4 deletions
|
@ -50,13 +50,14 @@ ConnectionToWindowServer::ConnectionToWindowServer(NonnullOwnPtr<Core::Stream::L
|
|||
auto message = wait_for_specific_message<Messages::WindowClient::FastGreet>();
|
||||
set_system_theme_from_anonymous_buffer(message->theme_buffer());
|
||||
Desktop::the().did_receive_screen_rects({}, message->screen_rects(), message->main_screen_index(), message->workspace_rows(), message->workspace_columns());
|
||||
Desktop::the().set_system_effects(message->effects());
|
||||
Gfx::FontDatabase::set_default_font_query(message->default_font_query());
|
||||
Gfx::FontDatabase::set_fixed_width_font_query(message->fixed_width_font_query());
|
||||
Gfx::FontDatabase::set_window_title_font_query(message->window_title_font_query());
|
||||
m_client_id = message->client_id();
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::fast_greet(Vector<Gfx::IntRect> const&, u32, u32, u32, Core::AnonymousBuffer const&, String const&, String const&, String const&, i32)
|
||||
void ConnectionToWindowServer::fast_greet(Vector<Gfx::IntRect> const&, u32, u32, u32, Core::AnonymousBuffer const&, String const&, String const&, String const&, Vector<bool> const&, i32)
|
||||
{
|
||||
// NOTE: This message is handled in the constructor.
|
||||
}
|
||||
|
@ -83,6 +84,11 @@ void ConnectionToWindowServer::update_system_fonts(String const& default_font_qu
|
|||
});
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::update_system_effects(Vector<bool> const& effects)
|
||||
{
|
||||
Desktop::the().set_system_effects(effects);
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::paint(i32 window_id, Gfx::IntSize const& window_size, Vector<Gfx::IntRect> const& rects)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(window_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue