mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
WindowServer: Support resizing windows.
This is pretty limited and not entirely stable, but it does work! :^)
This commit is contained in:
@@ -121,6 +121,11 @@ void GEventLoop::handle_paint_event(const WSAPI_ServerMessage& event, GWindow& w
|
||||
post_event(&window, make<GPaintEvent>(event.paint.rect));
|
||||
}
|
||||
|
||||
void GEventLoop::handle_resize_event(const WSAPI_ServerMessage& event, GWindow& window)
|
||||
{
|
||||
post_event(&window, make<GResizeEvent>(event.window.old_rect.size, event.window.rect.size));
|
||||
}
|
||||
|
||||
void GEventLoop::handle_window_activation_event(const WSAPI_ServerMessage& event, GWindow& window)
|
||||
{
|
||||
#ifdef GEVENTLOOP_DEBUG
|
||||
@@ -303,6 +308,9 @@ void GEventLoop::wait_for_event()
|
||||
case WSAPI_ServerMessage::Type::WindowLeft:
|
||||
handle_window_entered_or_left_event(event, *window);
|
||||
break;
|
||||
case WSAPI_ServerMessage::Type::WindowResized:
|
||||
handle_resize_event(event, *window);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user