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
Andreas Kling
eb78238032
Ext2FS: Don't worry about updating lookup caches in write_ext2_inode().
...
Instead, have Ext2FSInode worry about that when flushing.
Also tidy up in the inode bitmap accessors at the same time for some reason.
2019-01-01 03:55:43 +01:00
Andreas Kling
8f9542174f
Ext2FS: Don't cache a full Ext2FSInode object for non-existent inodes.
...
This was a bit silly. We were always creating Ext2FSInode objects when
Ext2FSInode::get_inode() was called. They'd then sit and fatten up the
inode cache forever, despite not representing allocated inodes.
This patch consults the inode bitmap and if get_inode() is called with
an unallocated inode index, we simply cache a nullptr to represent the
fact that this index is unused.
This could be a lot better optimized, it will currently hit the disk for
every new inode index encountered.
2019-01-01 03:37:27 +01:00
Andreas Kling
d07b08a287
FS: Don't default to having a full InodeMetadata in every Inode.
...
This allows Ext2FS to keep its own ext2_inode around instead.
2019-01-01 03:16:36 +01:00
Andreas Kling
0cb074dc73
Ext2FS: On second thought, let's not uncache the Ext2FSInodes today..
2019-01-01 02:52:21 +01:00
Andreas Kling
741349502f
Ext2FS: Free Ext2FSInodes when the last user releases them.
...
The inode cache was keeping these alive forever. Added a cute little magic
trick to Retainable that calls T::one_retain_left() when the retain count
is decremented to 1.
2019-01-01 02:38:09 +01:00
Andreas Kling
42d9f18cae
Remove the cheesy block cache from DiskBackedFS.
...
This should be reimplemented with proper paging support. This approach was
mostly just chewing kmalloc memory.
2019-01-01 02:27:05 +01:00
Andreas Kling
4b6a8f8a08
Unbreak ksym loading and make reading /proc/PID/stack not crash.
2019-01-01 02:20:01 +01:00
Andreas Kling
683185e4aa
MM: Allocate page tables from a separate set of physical pages.
...
The old approach only worked because of an overpermissive accident.
There's now a concept of supervisor physical pages that can be allocated.
They all sit in the low 4 MB of physical memory and are identity mapped,
shared between all processes, and only ring 0 can access them.
2019-01-01 02:09:43 +01:00
Andreas Kling
a5ffa2eec7
Add a PageDirectory::flush() that does nothing if another PD is active.
...
This way callers can just flush() every time after making any modification
and the PageDirectory itself will decide if TLB invalidation is necessary.
2018-12-31 20:52:59 +01:00
Andreas Kling
cc30407b8c
Oops, errno codes need to be negative in the kernel.
2018-12-31 20:38:25 +01:00
Andreas Kling
9eca2ffd41
Make PhysicalPage eternally allocated.
2018-12-31 20:25:42 +01:00
Andreas Kling
3e37a1f5c3
Optimize PageDirectory destruction.
...
Remove an extra hash lookup and only iterate over the actually-used
PhysicalPages that we need to clean up.
2018-12-31 15:18:02 +01:00
Andreas Kling
edac1d6748
Make PageDirectory store physical pages in a HashMap.
...
This container is really just there to keep a retain on the individual
PhysicalPages for each page table. A HashMap does the job with far greater
space efficiency.
2018-12-31 15:10:12 +01:00
Andreas Kling
193ead94f8
Let PageDirectory have a PhysicalPage for the PDB instead of being the PDB.
...
This is more efficient than using the wasteful kmalloc_aligned() approach
to allocation. It also allows much tighter encapsulation of the class.
2018-12-31 14:58:03 +01:00