Commit graph

11 commits

Author SHA1 Message Date
Andreas Kling
51595603bd WindowServer: Rename WSEvent subclasses WSFooEvent for consistency.
Add a WSWindowInvalidationEvent that carries a rect instead of having an
awkward single-purpose rect in WSEvent.
Flesh out WSKeyEvent a bit more.
2019-01-21 07:28:04 +01:00
Andreas Kling
aefbbeb3cb Flesh out keyboard event support a bit more. 2019-01-21 07:27:26 +01:00
Andreas Kling
dff5051905 Support polling with select() by using a zero timeout.
Use this in WindowServer to avoid getting blocked in select() when
there are pending injected events.
2019-01-18 05:28:07 +01:00
Andreas Kling
a01e119e05 WindowServer: Always select() in the event loop.
This fixes an issue where a steady stream of injected events would prevent
us from ever draining the mouse and keyboard inputs.
2019-01-18 04:59:08 +01:00
Andreas Kling
dff70021ab Make it possible to invalidate only a portion of a window.
Use this in Terminal to only invalidate rows where anything changed.
2019-01-18 04:37:49 +01:00
Andreas Kling
133f9aa352 WindowServer: Slap everything with locks. 2019-01-17 16:21:04 +01:00
Andreas Kling
36e0ab3f18 Ignore WM_Invalidate events if there is an unprocessed one in the queue. 2019-01-17 02:42:52 +01:00
Andreas Kling
1c63a37bc9 Only drain mouse/keyboard streams if they actually have data.
Technically we could just grab directly at the CharacterDevices like we've
been doing but I'd like to stay away from in-kernel behavior like that.
This should eventually become a userspace process.
2019-01-17 02:34:08 +01:00
Andreas Kling
d793323254 Respect the overflow bit in PS/2 mouse data. 2019-01-17 02:32:40 +01:00
Andreas Kling
4fef895eda Rework WindowServer to use select() in its main event loop.
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.
2019-01-16 17:20:58 +01:00
Andreas Kling
f7ca6d254d Tear out or duplicate what's unique for WindowServer from Widgets.
This turned into a huge refactoring that somehow also includes
making locks recursive/reentrant.
2019-01-16 16:03:50 +01:00