mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
WindowServer: Fix wrong-sized read() from keyboard
It's unfortunate that WindowServer::KeyEvent and the kernel KeyEvent have the same name here. Fixes #1190.
This commit is contained in:
parent
6a9cc66b97
commit
f24a6a7574
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ void EventLoop::drain_keyboard()
|
|||
auto& screen = Screen::the();
|
||||
for (;;) {
|
||||
::KeyEvent event;
|
||||
ssize_t nread = read(m_keyboard_fd, (u8*)&event, sizeof(KeyEvent));
|
||||
ssize_t nread = read(m_keyboard_fd, (u8*)&event, sizeof(::KeyEvent));
|
||||
if (nread == 0)
|
||||
break;
|
||||
ASSERT(nread == sizeof(::KeyEvent));
|
||||
|
|
Loading…
Add table
Reference in a new issue