mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 02:08:53 +00:00
WindowServer: Merge WM_WindowAdded and WM_WindowStateChanged.
These events are identical, so it's silly to send both. Just broadcast window state changes everywhere instead, it doesn't matter when it was added as clients are learning about this asynchronously anyway.
This commit is contained in:
parent
329cc60a92
commit
99b98dc653
Notes:
sideshowbarker
2024-07-19 14:48:50 +09:00
Author: https://github.com/awesomekling
Commit: 99b98dc653
9 changed files with 14 additions and 97 deletions
|
@ -273,8 +273,6 @@ void GEventLoop::handle_wm_event(const WSAPI_ServerMessage& event, GWindow& wind
|
|||
#ifdef GEVENTLOOP_DEBUG
|
||||
dbgprintf("GEventLoop: handle_wm_event: %d\n", (int)event.type);
|
||||
#endif
|
||||
if (event.type == WSAPI_ServerMessage::WM_WindowAdded)
|
||||
return post_event(window, make<GWMWindowAddedEvent>(event.wm.client_id, event.wm.window_id, String(event.text, event.text_length), event.wm.rect, event.wm.is_active, (GWindowType)event.wm.window_type));
|
||||
if (event.type == WSAPI_ServerMessage::WM_WindowStateChanged)
|
||||
return post_event(window, make<GWMWindowStateChangedEvent>(event.wm.client_id, event.wm.window_id, String(event.text, event.text_length), event.wm.rect, event.wm.is_active, (GWindowType)event.wm.window_type));
|
||||
if (event.type == WSAPI_ServerMessage::WM_WindowRemoved)
|
||||
|
@ -411,7 +409,6 @@ void GEventLoop::process_unprocessed_messages()
|
|||
case WSAPI_ServerMessage::Type::WindowResized:
|
||||
handle_resize_event(event, *window);
|
||||
break;
|
||||
case WSAPI_ServerMessage::Type::WM_WindowAdded:
|
||||
case WSAPI_ServerMessage::Type::WM_WindowRemoved:
|
||||
case WSAPI_ServerMessage::Type::WM_WindowStateChanged:
|
||||
handle_wm_event(event, *window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue