Commit graph

21 commits

Author SHA1 Message Date
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
b7d83e3265 Redraw both incoming and outgoing widget when changing focus. 2019-01-12 07:11:24 +01:00
Andreas Kling
ceb373cf71 More window manager hacking. FocusIn/FocusOut events. 2019-01-09 05:40:04 +01:00
Andreas Kling
cfd76ade73 Stop recomposing the window hierarchy after every dang widget paint. 2019-01-09 04:46:16 +01:00
Andreas Kling
9963da9005 Start refactoring graphics system to have per-window backing stores.
It was fun for everyone to share a single framebuffer but it was also
kinda really awful. Let's move towards having a "GraphicsBitmap" as the
backing store for each Window.

This is going to need a lot of refactoring so let's get started.
2019-01-09 02:06:04 +01:00
Andreas Kling
ec1c487dcd Yet another pass of style fixes. 2018-12-21 02:10:45 +01:00
Andreas Kling
8fa2d7104a More VFS cleanup. 2018-11-15 16:04:25 +01:00
Andreas Kling
959a1b0750 Close the MsgBox when clicking the OK button.
This feels vaguely crashy. I haven't tested window/widget destruction
before so there's sure to be bugs.
2018-10-14 01:23:01 +02:00
Andreas Kling
3ebea05996 Add a simple MsgBox() :^) 2018-10-14 00:21:42 +02:00
Andreas Kling
6f1b384cde More work on focus.
ListBox now renders differently depending on focus state.
2018-10-13 20:59:25 +02:00
Andreas Kling
1929cb6b71 Implement basic focus. 2018-10-13 17:52:47 +02:00
Andreas Kling
44a32039be Let the WindowManager track the active window.
We draw the active window in a different color, obviously. :^)
2018-10-13 17:42:43 +02:00
Andreas Kling
6ea8ce500c Use HashMap::remove() in some places that I wanted it. 2018-10-13 14:26:37 +02:00
Andreas Kling
f20977c65f Add a basic Listbox widget. 2018-10-13 00:20:44 +02:00
Andreas Kling
6f9e0e3876 After moving a window, try to repaint a bit less.
Only repaint windows that intersect either the old or the new rect.
Also only repaint those rects in the root widget.
2018-10-12 19:39:48 +02:00
Andreas Kling
16576112b0 Add a CheckBox widget. 2018-10-12 14:16:40 +02:00
Andreas Kling
73895ce043 Add a clock widget. 2018-10-12 12:18:59 +02:00
Andreas Kling
6f6f9bd84d Window contents move along with the window! 2018-10-12 02:41:27 +02:00
Andreas Kling
5d125e40d9 Deliver mouse events to the appropriate Window. 2018-10-12 01:26:20 +02:00
Andreas Kling
415c4b90c5 Start adding a Window class. 2018-10-12 01:03:22 +02:00