1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 11:47:35 +00:00

Kernel/HID: Introduce the all-mice device

This device will be used by userspace to read mouse packets from all
mouse devices that are attached to the machine.

This change is a preparation before we can enable seamless hotplug
capabilities in WindowServer for mouse devices, without any major change
on the userspace side.
This commit is contained in:
Liav A 2023-10-06 21:59:39 +03:00 committed by Andrew Kaster
parent 75183402fd
commit 8a0a3638f0
6 changed files with 111 additions and 0 deletions

View file

@ -23,6 +23,7 @@ MouseDevice::MouseDevice()
void MouseDevice::handle_mouse_packet_input_event(MousePacket packet)
{
m_entropy_source.add_random_event(packet);
HIDManagement::the().enqueue_mouse_packet({}, packet);
{
SpinlockLocker lock(m_queue_lock);
m_queue.enqueue(packet);