From 1c63a37bc9f25e23595cec604edb0f2bbc425c9e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 17 Jan 2019 02:34:08 +0100 Subject: [PATCH] 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. --- WindowServer/WSEventLoop.cpp | 4 ++-- 1 file 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(); }