1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

Make it possible to invalidate only a portion of a window.

Use this in Terminal to only invalidate rows where anything changed.
This commit is contained in:
Andreas Kling 2019-01-18 04:37:49 +01:00
parent 9d7da26b4e
commit dff70021ab
15 changed files with 91 additions and 15 deletions

View file

@ -83,7 +83,9 @@ void WSEventLoop::post_event(WSEventReceiver* receiver, OwnPtr<WSEvent>&& event)
if (event->type() == WSEvent::WM_Invalidate) {
for (auto& queued_event : m_queued_events) {
if (receiver == queued_event.receiver && queued_event.event->type() == WSEvent::WM_Invalidate) {
if (receiver == queued_event.receiver
&& queued_event.event->type() == WSEvent::WM_Invalidate
&& (queued_event.event->rect().is_empty() || queued_event.event->rect().contains(event->rect()))) {
#ifdef WSEVENTLOOP_DEBUG
dbgprintf("Swallow WM_Invalidate\n");
#endif