Andreas Kling
84ae4e5880
WindowManager should only flush pixels inside the screen rect.
2019-01-12 16:41:03 +01:00
Andreas Kling
8d78b0a8df
Tidy up the h/v line drawing loops a bit.
2019-01-12 16:39:56 +01:00
Andreas Kling
b4bd4f4b29
Make the Event class virtual.
...
I realized that we're leaking all the members in Event subclasses.
2019-01-12 07:24:38 +01:00
Andreas Kling
8068b8e09e
Add a Vector::clear_with_capacity() that doesn't release the backing store.
...
Use this for WindowManager's dirty rects to avoid kmalloc traffic.
2019-01-12 07:22:25 +01:00
Andreas Kling
b7d83e3265
Redraw both incoming and outgoing widget when changing focus.
2019-01-12 07:11:24 +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
57b13274da
Let the EventLoop drive the WindowManager through WM_Compose events.
2019-01-12 06:47:55 +01:00
Andreas Kling
780e15a6cc
All right, let's double buffer the display. It looks so much better.
...
This performs like dogshit. I need to make some optimizations. :^)
2019-01-12 06:39:34 +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
52e019f9aa
Only initiate window title bar drags for left mouse button clicks.
2019-01-12 04:16:40 +01:00
Andreas Kling
db0dbbd979
Fix unpainted area in Button rendering.
2019-01-12 04:11:44 +01:00
Andreas Kling
783c64916b
Tidy up window border rendering a bit.
2019-01-12 04:02:36 +01:00
Andreas Kling
bb28c31531
Get rid of the "root widget" concept in WindowManager.
...
Instead just create a GraphicsBitmap wrapper around the display framebuffer
and teach Painter how to draw directly into a GraphicsBitmap.
2019-01-12 03:42:50 +01:00
Andreas Kling
0e6c19ffa6
Reduce PS2MouseDevice debug spam in every dang mouse interrupt.
2019-01-12 03:20:48 +01:00
Andreas Kling
5db720dc59
Don't repaint the root layer in invalidated areas with windows over them.
2019-01-12 03:13:42 +01:00
Andreas Kling
83252397e4
Ignore WindowManager invalidations inside already invalidated rects.
2019-01-12 03:07:23 +01:00
Andreas Kling
d6bbd2126d
Start refactoring the WindowManager to be invalidation driven.
2019-01-12 02:58:58 +01:00
Andreas Kling
fa6029eed0
Make the kernel's memset do a "rep stosb" because.
2019-01-12 02:23:09 +01:00
Andreas Kling
9bc7b128b2
Constrain the mouse cursor to keep it inside the screen rect.
2019-01-12 01:00:24 +01:00
Andreas Kling
b95aa18315
Hook up the Keyboard device to the AbstractScreen.
...
Basic text editing in a TextBox works. How very cool :^)
2019-01-11 04:40:05 +01:00
Andreas Kling
a3c39ea9d6
Throw up some widgets on screen so we can see what they look like.
2019-01-11 04:10:07 +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
31667b47a5
Teach PS2MouseDevice to read the left and right buttons.
2019-01-11 02:45:06 +01:00
Andreas Kling
e740f1195a
Add a simple PS/2 mouse device.
...
It's not hooked up to anything just yet, but it does read movement deltas.
2019-01-11 02:28:53 +01:00
Andreas Kling
d1ceb4b603
Fix uninitialized AbstractScreen instance pointer.
...
...yeah yeah, one day I'm gonna zero out the kernel's BSS segment. Soon..
2019-01-11 01:43:41 +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
8626e95509
Make Widgets/ build inside the kernel.
2019-01-10 22:52:14 +01:00
Andreas Kling
e180e2553a
Rename CBitmap to CharacterBitmap.
2019-01-10 05:41:49 +01:00
Andreas Kling
305aa25aae
Let's have an RGBA32 typedef for raw pixel data.
2019-01-10 05:36:32 +01:00
Andreas Kling
df799e6d7b
ColorSDL.cpp -> Color.cpp
2019-01-10 05:29:36 +01:00
Andreas Kling
f603c17136
Merge EventLoopSDL into EventLoop.
2019-01-10 05:28:37 +01:00
Andreas Kling
3e908abfca
Start separating out the SDL-related stuff in Widgets.
2019-01-10 05:21:19 +01:00
Andreas Kling
077f1007eb
More window manager hacking. Get rid of TerminalWidget for now.
2019-01-10 05:11:07 +01:00
Andreas Kling
ceb373cf71
More window manager hacking. FocusIn/FocusOut events.
2019-01-09 05:40:04 +01:00
Andreas Kling
7577ee0c67
Remove some #if 0'd code.
2019-01-09 04:51:30 +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
f3ec96a1b9
Print the number of WindowManager recompose() calls to debugger.
2019-01-09 04:18:28 +01:00
Andreas Kling
39e236d346
Let WindowManager send out events for WindowBecame{Active,Inactive}
2019-01-09 04:15:17 +01:00
Andreas Kling
4775fd88e3
More window management work.
...
- Fix inverted mouse event hit test z-ordering.
- Let the RootWidget backing store simply be the display framebuffer.
2019-01-09 03:51:34 +01:00
Andreas Kling
723ff8c2ab
Add basic z-order for Windows.
2019-01-09 03:16:58 +01:00
Andreas Kling
baec8925a8
Fix blit bleed for windows with x() < 0.
2019-01-09 02:51:53 +01:00
Andreas Kling
659c54e32b
Switch into 1024x768x32bpp VESA LFB mode at boot.
...
This is going to be pretty cool once I can hook up the Widgets/ code to it.
2019-01-09 02:29:11 +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
2735b7e50d
Add PhysicalAddress::offset().
2019-01-08 22:29:34 +01:00
Andreas Kling
c088529cd8
Fix broken "make clean" in Userland.
2019-01-08 22:28:58 +01:00
Andreas Kling
355201f34d
Vector<String>() -> { }
2019-01-08 22:28:11 +01:00
Andreas Kling
ba91ab1038
Don't omit frame pointers. Duh. This fixes /proc/PID/stack listings.
2019-01-04 19:02:21 +01:00
Andreas Kling
bad2fe33ad
Fix crash when doing "ls -l" in the /proc/PID directory for a kernel process.
2019-01-04 18:50:16 +01:00
Andreas Kling
0d36281162
Refactor FS::find_parent_of_inode() into Inode::parent().
...
This way, Ext2FSInode can cache its parent inode index. This makes absolute
path lookups dramatically faster.
SynthFSInode is also simplified greatly.
2019-01-04 18:37:58 +01:00
Andreas Kling
7731aef7b2
Let the "reaped unparented process" messages go straight to the debugger.
2019-01-01 03:56:39 +01:00