We need to look at the i8042 status register to see if the packets in the
PS/2 controller's output buffer are mouse or keyboard packets.
This fixes occasionally surprising inputs while using both devices.
The system can finally idle without burning CPU. :^)
There are some issues with scheduling making the mouse cursor sloppy
and unresponsive that need to be dealt with.
Userspace programs can now open /dev/gui_events and read a stream of GUI_Event
structs one at a time.
I was stuck on a stupid problem where we'd reenter Scheduler::yield() due to
having one of the has_data_available_for_reading() implementations using locks.
Get rid of the goofy MouseClient interface and have the GUI event loop just
read mouse data from the character device.
The previous approach was awful as it was sending us into random GUI code
in the mouse interrupt handler.
Render the mouse cursor by xor'ing the pixels. I don't know anything about
hardware cursors yet and this way we don't need to recompose the window
hierarchy every time you move the mouse. :^)