diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-23 20:59:32 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-25 14:48:40 +0200 |
commit | 411d36719e8ee562bede1a6520891df4e43992f2 (patch) | |
tree | d4c0d4927bc2b4d1212756858fa3239ce80be5e0 /Userland/Services/WindowServer | |
parent | 1587caef842c66ed382fc75c8f116d09ea7acc06 (diff) | |
download | serenity-411d36719e8ee562bede1a6520891df4e43992f2.zip |
LibCore: Simplify Core::Notifier by only allowing one event type
Not a single client of this API actually used the event mask feature to
listen for readability AND writability.
Let's simplify the API and have only one hook: on_activation.
Diffstat (limited to 'Userland/Services/WindowServer')
-rw-r--r-- | Userland/Services/WindowServer/EventLoop.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Services/WindowServer/EventLoop.cpp b/Userland/Services/WindowServer/EventLoop.cpp index 04dfe2ec41..0068a25583 100644 --- a/Userland/Services/WindowServer/EventLoop.cpp +++ b/Userland/Services/WindowServer/EventLoop.cpp @@ -27,15 +27,15 @@ EventLoop::EventLoop() m_wm_server = MUST(IPC::MultiServer<WMConnectionFromClient>::try_create("/tmp/portal/wm")); if (m_keyboard_fd >= 0) { - m_keyboard_notifier = Core::Notifier::construct(m_keyboard_fd, Core::Notifier::Read); - m_keyboard_notifier->on_ready_to_read = [this] { drain_keyboard(); }; + m_keyboard_notifier = Core::Notifier::construct(m_keyboard_fd, Core::Notifier::Type::Read); + m_keyboard_notifier->on_activation = [this] { drain_keyboard(); }; } else { 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(); }; + m_mouse_notifier = Core::Notifier::construct(m_mouse_fd, Core::Notifier::Type::Read); + m_mouse_notifier->on_activation = [this] { drain_mouse(); }; } else { dbgln("Couldn't open /dev/input/mouse/0"); } |