mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
Userland: Move HID input device nodes to /dev/input/{mouse,keyboard}
Because HID devices are not always present in quantities of one per type it is more elegant and correct to put the representative device nodes in subdirectories for each HID device type.
This commit is contained in:
parent
712af40075
commit
89835558b4
3 changed files with 13 additions and 10 deletions
|
@ -20,8 +20,8 @@ namespace WindowServer {
|
|||
|
||||
EventLoop::EventLoop()
|
||||
{
|
||||
m_keyboard_fd = open("/dev/keyboard0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
m_mouse_fd = open("/dev/mouse0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
m_keyboard_fd = open("/dev/input/keyboard/0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
m_mouse_fd = open("/dev/input/mouse/0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
|
||||
m_window_server = MUST(IPC::MultiServer<ConnectionFromClient>::try_create("/tmp/portal/window"));
|
||||
m_wm_server = MUST(IPC::MultiServer<WMConnectionFromClient>::try_create("/tmp/portal/wm"));
|
||||
|
@ -30,14 +30,14 @@ EventLoop::EventLoop()
|
|||
m_keyboard_notifier = Core::Notifier::construct(m_keyboard_fd, Core::Notifier::Read);
|
||||
m_keyboard_notifier->on_ready_to_read = [this] { drain_keyboard(); };
|
||||
} else {
|
||||
dbgln("Couldn't open /dev/keyboard0");
|
||||
dbgln("Couldn't open /dev/input/keyboard/0");
|
||||
}
|
||||
|
||||
if (m_mouse_fd >= 0) {
|
||||
m_mouse_notifier = Core::Notifier::construct(m_mouse_fd, Core::Notifier::Read);
|
||||
m_mouse_notifier->on_ready_to_read = [this] { drain_mouse(); };
|
||||
} else {
|
||||
dbgln("Couldn't open /dev/mouse0");
|
||||
dbgln("Couldn't open /dev/input/mouse/0");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue