Andreas Kling
d74b131c27
Add a little About app and hook it up to the system menu's "About..." entry.
...
Added icons and customizable text alignment to GLabel.
2019-02-12 15:23:07 +01:00
Andreas Kling
627e06632a
WindowServer: Don't crash when trying to open an empty menu.
2019-02-12 14:28:39 +01:00
Andreas Kling
ec7099dac3
WindowServer: Made a slightly nicer icon for the system menu.
2019-02-12 13:19:58 +01:00
Andreas Kling
2b94b54640
WindowServer: Draw menu windows above normal windows.
2019-02-12 13:04:54 +01:00
Andreas Kling
7ce15f1c54
Fix some compilation warnings.
2019-02-12 12:11:22 +01:00
Andreas Kling
c61f9eba61
WindowServer: Add a WSWindowType enum.
...
So far there's only Normal and Menu. Maybe we'll need more later.
2019-02-12 11:53:45 +01:00
Andreas Kling
7def86c86d
WindowServer: Send all mouse events inside the menubar rect to the menubar.
2019-02-12 10:47:02 +01:00
Andreas Kling
e03af1e8b9
WindowServer: Make it possible to launch a terminal from the system menu.
2019-02-12 10:45:09 +01:00
Andreas Kling
4b8133e925
WindowServer: Clean up any menu objects on process exit.
...
..and now that this works, implement the Quit menu action in Terminal. :^)
2019-02-12 10:41:09 +01:00
Andreas Kling
db98327bdc
Plumb menu item activation events from WindowServer to clients.
...
GMenu now has an "on_item_activation" callback that fires whenever one
of its items are activated. The menu item identifier is used to distinguish
between items.
Use this to implement font switching in Terminal. :^)
2019-02-12 10:08:35 +01:00
Andreas Kling
9c1c885483
WindowServer: Add locking and fix coalesced invalidation race.
...
WSWindowManager::invalidate() had a bug where it would mark the entire screen
rect as dirty, but it wouldn't scheduled a deferred recompose.
This would cause any subsequent calls to invalidate(Rect) to be coalesced
with the pending compose, but the pending compose never happened.
2019-02-12 09:25:50 +01:00
Andreas Kling
5cd588a497
WindowServer: Always include the system menu in the menubar.
...
Solve this by adding a for_each_active_menubar_menu() iteration helper that
automagically visits the system menu before the current menubar's menus.
2019-02-12 08:49:07 +01:00
Andreas Kling
15b4c9f9f1
WindowServer: More work on the menu system.
...
Menus are now tied to a Process (by WeakPtr.) This will allow us to pass
notifications to the correct event stream.
2019-02-12 08:39:19 +01:00
Andreas Kling
133706d697
Add API's and plumbing for WindowServer clients to make menus.
2019-02-12 00:52:19 +01:00
Andreas Kling
bb31d961b4
WindowServer: Let's call the default menu "Dummy" for now.
2019-02-11 15:39:19 +01:00
Andreas Kling
8d0bfa62fd
WindowServer: Add a bunch of horizontal padding to menu items.
...
All right, this looks a lot nicer. :^)
2019-02-11 14:14:49 +01:00
Andreas Kling
3c863e0ffa
WindowServer: Make automatic menu dismissal feel more "natural."
2019-02-11 13:59:26 +01:00
Andreas Kling
43d9994d93
WindowServer: Oops, we have to keep processing WSMessages with !m_process.
...
Otherwise we'll never handle WM_DestroyWindow and the window sticks around.
2019-02-11 13:23:26 +01:00
Andreas Kling
26230c0647
WindowServer: Remove "unsafe" flag in WSMessageLoop::post_event().
...
This hack is no longer needed now that we have a Finalizer process that can
take locks without having to worry about the interrupt flag.
2019-02-11 13:05:51 +01:00
Andreas Kling
f7b25773ab
WindowServer: Let's have a cute little symbol for the system menu.
2019-02-11 13:00:41 +01:00
Andreas Kling
e6de6c4f45
WindowServer: Don't keep menu items in hovered state after the cursor leaves.
2019-02-11 11:06:41 +01:00
Andreas Kling
6dd1a1f26d
WindowServer: Switch current menu if hovering over another menu with button.
2019-02-11 10:59:48 +01:00
Andreas Kling
145aa27b8f
WindowServer: Give menu items an identifier field and add a simple callback.
...
Eventually these identifiers will be sent to the userspace client who created
the menu. None of that is hooked up yet though.
2019-02-11 10:55:02 +01:00
Andreas Kling
78fc7a9ef2
WindowServer: Menu windows should be at least as wide as their menubar rects.
2019-02-11 10:19:56 +01:00
Andreas Kling
5f288014d4
WindowServer: More work on menus.
2019-02-11 10:08:54 +01:00
Andreas Kling
443b043b49
WindowServer: Start implementing a menu system.
...
I'm going with a global top-of-the-screen menu instead of per-window menus.
The basic idea is that menus will live in the WindowServer and clients can
create menus via WindowServer requests.
2019-02-11 09:47:10 +01:00
Andreas Kling
a6f9ddbb58
Let's have two wallpapers installed so we can test switching.
2019-02-08 17:14:47 +01:00
Andreas Kling
33d34d9b26
Kernel: Use a Lockable<bool> for sysctl booleans as well.
2019-02-08 16:18:24 +01:00
Andreas Kling
7a996e608c
WindowServer: Allow changing the desktop wallpaper through a sysctl.
...
Just write the path of your new wallpaper to /proc/sys/wm_wallpaper. :^)
2019-02-08 09:49:09 +01:00
Andreas Kling
004aad0995
WindowServer: Set the WSMessageLoop::server_process() as early as possible.
2019-02-08 09:47:57 +01:00
Andreas Kling
90d3375dc2
WindowServer: Support desktop wallpapers.
...
For now, you don't get to choose the wallpaper, but it's still pretty cool.
2019-02-08 08:45:59 +01:00
Andreas Kling
71b9ec1ae0
Kernel: Add basic process priority support.
...
For now, the WindowServer process will run with high priority,
while the Finalizer process will run with low priority.
Everyone else gets to be "normal".
At the moment, priority simply determines the size of your time slices.
2019-02-07 12:21:17 +01:00
Andreas Kling
5582a0a254
Kernel: When a lock is busy, donate remaining process ticks to lock holder.
...
Since we know who's holding the lock, and we're gonna have to yield anyway,
we can just ask the scheduler to donate any remaining ticks to that process.
2019-02-07 11:14:58 +01:00
Andreas Kling
443d1c2237
WindowServer: Coordinate double-buffering with the BochsVGA card.
...
Use the BochsVGA card's virtual-height + virtual-y features to implement
a "hardware double buffering" type scheme.
This is a performance degradation since we now draw a bunch more than before.
But there's also no tearing or cursor flickering. I'm gonna commit this and
try to improve upon it. :^)
2019-02-07 08:56:26 +01:00
Andreas Kling
e29060620f
WindowServer: Improve parsing of mouse packets.
2019-02-07 08:08:08 +01:00
Andreas Kling
a1b63bb6d4
Bootloader: Locate the kernel's data segment and clear it.
...
This was a constant source of stupid bugs and I kept postponing it because
I wasn't in the mood to write assembly code. Until now! :^)
2019-02-06 16:02:10 +01:00
Andreas Kling
731fc5a7c8
Kernel: Much improved BochsVGA (BXVGA) support.
...
Instead of cowboy-calling the VESA BIOS in the bootloader, find the emulator
VGA adapter by scanning the PCI bus. Then set up the desired video mode by
sending device commands.
2019-02-06 10:17:26 +01:00
Andreas Kling
caff611ca3
WindowServer: Tweak window title bar look.
2019-02-05 13:20:36 +01:00
Andreas Kling
0a183df655
WindowServer: Tweak look of window close button.
2019-02-05 12:01:47 +01:00
Andreas Kling
38f589a9cb
SharedGraphics: Add some useful painting helpers and make use of them.
2019-02-05 11:42:58 +01:00
Andreas Kling
cd1bbdf052
WindowServer: Make the window close button look a bit nicer.
2019-02-05 11:05:24 +01:00
Andreas Kling
11db8c1697
Add a simple close button ("X") to windows.
...
Clicking the button generates a WindowCloseRequest event which the client app
then has to deal with. The default behavior for GWindow is to close() itself.
I also added a flag, GWindow::should_exit_event_loop_on_close() which does
what it sounds like it does.
This patch exposed some bugs in GWindow and GWidget teardown.
2019-02-05 10:31:37 +01:00
Andreas Kling
b1e054ffe8
Rename LizaBold to LizaRegular and LizaBlack to LizaBold.
...
LizaRegular is quickly becoming my favorite bitmap font. It's so pretty :^)
2019-02-05 09:08:25 +01:00
Andreas Kling
0c38a4c30f
WindowServer: Sever the WSWindow/Process link when the process dies.
...
This fixes a deadlock where the WindowServer would get stuck trying to
acquire a dead process's event stream lock.
2019-02-05 08:32:32 +01:00
Andreas Kling
cacba45f1c
LizaBold8x10: Import a bold variant of Liza8x10 and make it the default bold.
...
Start using it right away for window titles.
2019-02-04 11:37:15 +01:00
Andreas Kling
5e9ba2ac84
Kernel: Rewrite ProcFS.
...
Now the filesystem is generated on-the-fly instead of manually adding and
removing inodes as processes spawn and die.
The code is convoluted and bloated as I wrote it while sleepless. However,
it's still vastly better than the old ProcFS, so I'm committing it.
I also added /proc/PID/fd/N symlinks for each of a process's open fd's.
2019-02-03 12:33:11 +01:00
Andreas Kling
2a093ada33
WindowServer: Add some stripes to the window titles.
...
I like the look of this right now. Maybe later I'll feel differently.
2019-02-03 03:38:44 +01:00
Andreas Kling
5e0b7f1a56
Add basic automatic dependency management to Makefiles.
2019-02-02 04:41:59 +01:00
Andreas Kling
ffab6897aa
Big, possibly complete sweep of naming changes.
2019-01-31 17:31:23 +01:00
Andreas Kling
5c25f0c4db
Destroy all remaining windows in a process when it dies.
2019-01-30 19:35:38 +01:00