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.
This commit is contained in:
Andreas Kling 2019-01-17 02:34:08 +01:00
parent d793323254
commit 1c63a37bc9
Notes: sideshowbarker 2024-07-19 16:01:01 +09:00

View file

@ -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();
}