1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 14:55:08 +00:00
Commit graph

14 commits

Author SHA1 Message Date
Andreas Kling
bd3e77cc16 Pass the process to CharacterDevice::read/write.
This is much nicer than grabbing directly at 'current' inside a read().
2019-01-16 00:20:38 +01:00
Andreas Kling
08bfe518f9 Rename CharacterDevice::has_data_available_for_reading() -> can_read(). 2019-01-16 00:10:13 +01:00
Andreas Kling
bfef4afa6a So long SDL stuff. You were a nice bootstrapping environment. 2019-01-14 15:30:37 +01:00
Andreas Kling
b0e3f73375 Start refactoring the windowing system to use an event loop.
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.
2019-01-14 14:42:49 +01:00
Andreas Kling
8f8c8d1ca3 Start working on a GUI kernel API. 2019-01-13 02:02:34 +01:00
Andreas Kling
3ac977f50b Paper over a race in DoubleBuffer.
I'm still somewhat okay throwing InterruptDisabler at races as they screw me.
Eventually I'm gonna have to devise a different strategy though.
2019-01-12 23:23:35 +01:00
Andreas Kling
07873332e7 Coalesce mouse events to make the GUI go fast.
A simple but effective optimization that avoids tons of redraw. :^)
2019-01-12 06:59:10 +01:00
Andreas Kling
fd4e86460b Make PS2MouseDevice behave more like a proper character device.
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.
2019-01-12 05:23:16 +01:00
Andreas Kling
e5e295052f Hook up the PS2MouseDevice to the AbstractScreen+WindowManager.
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. :^)
2019-01-11 03:52:09 +01:00
Andreas Kling
f6d2c3ed87 Hook everything up to run the GUI on top of the kernel.
Okay things kinda sorta work. Both Bochs and QEMU now boot into GUI mode.
There's a ton of stuff that doesn't make sense and so many things to rework.

Still it's quite cool to have made it this far. :^)
2019-01-10 23:19:29 +01:00
Andreas Kling
f603c17136 Merge EventLoopSDL into EventLoop. 2019-01-10 05:28:37 +01:00
Andreas Kling
ec1c487dcd Yet another pass of style fixes. 2018-12-21 02:10:45 +01:00
Andreas Kling
bd6172e3c7 Use Font in more places. 2018-10-11 23:59:39 +02:00
Andreas Kling
8c84f9749e Start working on a Widgets library. 2018-10-10 15:12:38 +02:00