1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

WindowServer: Rename WSEvent subclasses WSFooEvent for consistency.

Add a WSWindowInvalidationEvent that carries a rect instead of having an
awkward single-purpose rect in WSEvent.
Flesh out WSKeyEvent a bit more.
This commit is contained in:
Andreas Kling 2019-01-21 07:28:04 +01:00
parent aefbbeb3cb
commit 51595603bd
8 changed files with 72 additions and 81 deletions

View file

@ -120,10 +120,10 @@ int Process::gui$invalidate_window(int window_id, const GUI_Rect* rect)
dbgprintf("%s<%u> gui$invalidate_window (window_id=%d, rect={%d,%d %dx%d})\n", name().characters(), pid(), window_id, rect->location.x, rect->location.y, rect->size.width, rect->size.height);
#endif
auto& window = *(*it).value;
auto event = make<WSEvent>(WSEvent::WM_Invalidate);
Rect invalidation_rect;
if (rect)
event->set_rect(*rect);
WSEventLoop::the().post_event(&window, move(event));
invalidation_rect = *rect;
WSEventLoop::the().post_event(&window, make<WSWindowInvalidationEvent>(invalidation_rect));
WSEventLoop::the().server_process().request_wakeup();
return 0;
}