mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +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
|
@ -305,6 +305,8 @@ void Widget::event(Core::Event& event)
|
|||
return change_event(static_cast<Event&>(event));
|
||||
case Event::ContextMenu:
|
||||
return context_menu_event(static_cast<ContextMenuEvent&>(event));
|
||||
case Event::AppletAreaRectChange:
|
||||
return applet_area_rect_change_event(static_cast<AppletAreaRectChangeEvent&>(event));
|
||||
default:
|
||||
return Core::Object::event(event);
|
||||
}
|
||||
|
@ -579,6 +581,10 @@ void Widget::screen_rects_change_event(ScreenRectsChangeEvent&)
|
|||
{
|
||||
}
|
||||
|
||||
void Widget::applet_area_rect_change_event(AppletAreaRectChangeEvent&)
|
||||
{
|
||||
}
|
||||
|
||||
void Widget::update()
|
||||
{
|
||||
if (rect().is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue