mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
1179d5d921
commit
9df79a77da
@@ -321,6 +321,13 @@ void WindowServerConnection::screen_rects_changed(Vector<Gfx::IntRect> const& re
|
||||
});
|
||||
}
|
||||
|
||||
void WindowServerConnection::applet_area_rect_changed(Gfx::IntRect const& rect)
|
||||
{
|
||||
Window::for_each_window({}, [&](auto& window) {
|
||||
Core::EventLoop::current().post_event(window, make<AppletAreaRectChangeEvent>(rect));
|
||||
});
|
||||
}
|
||||
|
||||
void WindowServerConnection::set_wallpaper_finished(bool)
|
||||
{
|
||||
// This is handled manually by Desktop::set_wallpaper().
|
||||
|
||||
Reference in New Issue
Block a user