summaryrefslogtreecommitdiff
path: root/WindowServer/WSMessageLoop.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-12 09:24:28 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-12 09:25:50 +0100
commit9c1c8854831005cee601d73bba3a0737f350c236 (patch)
tree3904d07477df414377bc4524a6fb1e3e5802ea4e /WindowServer/WSMessageLoop.cpp
parent431e7bf0852137a399476bd9e78fb8023c937ced (diff)
downloadserenity-9c1c8854831005cee601d73bba3a0737f350c236.zip
WindowServer: Add locking and fix coalesced invalidation race.
WSWindowManager::invalidate() had a bug where it would mark the entire screen rect as dirty, but it wouldn't scheduled a deferred recompose. This would cause any subsequent calls to invalidate(Rect) to be coalesced with the pending compose, but the pending compose never happened.
Diffstat (limited to 'WindowServer/WSMessageLoop.cpp')
-rw-r--r--WindowServer/WSMessageLoop.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WindowServer/WSMessageLoop.cpp b/WindowServer/WSMessageLoop.cpp
index d7875079e6..f9535880f6 100644
--- a/WindowServer/WSMessageLoop.cpp
+++ b/WindowServer/WSMessageLoop.cpp
@@ -54,7 +54,7 @@ int WSMessageLoop::exec()
auto* receiver = queued_message.receiver;
auto& message = *queued_message.message;
#ifdef WSEVENTLOOP_DEBUG
- dbgprintf("WSMessageLoop: receiver{%p} message %u (%s)\n", receiver, (unsigned)event.type(), event.name());
+ dbgprintf("WSMessageLoop: receiver{%p} message %u\n", receiver, (unsigned)message.type());
#endif
if (!receiver) {
dbgprintf("WSMessage type %u with no receiver :(\n", message.type());
@@ -71,7 +71,7 @@ void WSMessageLoop::post_message(WSMessageReceiver* receiver, OwnPtr<WSMessage>&
{
LOCKER(m_lock);
#ifdef WSEVENTLOOP_DEBUG
- dbgprintf("WSMessageLoop::post_message: {%u} << receiver=%p, message=%p\n", m_queued_messages.size(), receiver, message.ptr());
+ dbgprintf("WSMessageLoop::post_message: {%u} << receiver=%p, message=%p (type=%u)\n", m_queued_messages.size(), receiver, message.ptr(), message->type());
#endif
if (message->type() == WSMessage::WM_ClientFinishedPaint) {
@@ -127,6 +127,7 @@ void WSMessageLoop::wait_for_message()
params.timeout = nullptr;
else
params.timeout = &timeout;
+
int rc = m_server_process->sys$select(&params);
memory_barrier();
if (rc < 0) {