mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:57:35 +00:00
WindowServer: Add message to notify clients of applet area resize
Applets and windows would like to be able to know when the applet area has been resized. For example, this happens asynchronously after an applet has been resized, so we cannot then rely on the applet area position synchronously after resizing. This adds a new message applet_area_rect_changed and associated Event AppletAreaRectChange, and the appropriate virtual functions.
This commit is contained in:
parent
1179d5d921
commit
9df79a77da
10 changed files with 62 additions and 0 deletions
|
@ -42,6 +42,10 @@ void WMClientConnection::set_applet_area_position(Gfx::IntPoint const& position)
|
|||
}
|
||||
|
||||
AppletManager::the().set_position(position);
|
||||
|
||||
WindowServer::ClientConnection::for_each_client([](auto& connection) {
|
||||
connection.post_message(Messages::WindowClient::AppletAreaRectChanged(AppletManager::the().window()->rect()));
|
||||
});
|
||||
}
|
||||
|
||||
void WMClientConnection::set_active_window(i32 client_id, i32 window_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue