summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-17 02:34:08 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-17 02:34:08 +0100
commit1c63a37bc9f25e23595cec604edb0f2bbc425c9e (patch)
treef7f32096b380ca8f0e21f306fd2fa3061866e364
parentd793323254723579b3d193a2fa734bf5c569937e (diff)
downloadserenity-1c63a37bc9f25e23595cec604edb0f2bbc425c9e.zip
Only drain mouse/keyboard streams if they actually have data.
Technically we could just grab directly at the CharacterDevices like we've been doing but I'd like to stay away from in-kernel behavior like that. This should eventually become a userspace process.
-rw-r--r--WindowServer/WSEventLoop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WindowServer/WSEventLoop.cpp b/WindowServer/WSEventLoop.cpp
index 1d838e341a..f5f7e105a4 100644
--- a/WindowServer/WSEventLoop.cpp
+++ b/WindowServer/WSEventLoop.cpp
@@ -104,9 +104,9 @@ void WSEventLoop::wait_for_event()
ASSERT_NOT_REACHED();
}
- //if (bitmap.get(m_keyboard_fd))
+ if (bitmap.get(m_keyboard_fd))
drain_keyboard();
- //if (bitmap.get(m_mouse_fd))
+ if (bitmap.get(m_mouse_fd))
drain_mouse();
}