Andreas Kling
fa452fadca
WindowServer: Let menu objects reference the WSClientConnection by pointer.
...
Since these are owner/ownee relationships, there's no need for indirection.
2019-02-17 09:07:07 +01:00
Andreas Kling
9a39c01551
WindowServer: WSWindow can have a pointer to the client rather than an ID.
...
Since WSWindows are owned by WSConnectionClients, it's fine for them to just
reference the client directly.
2019-02-17 08:54:57 +01:00
Andreas Kling
82768e7ac5
WindowServer: Move video mode setup to WSScreen.
2019-02-17 01:43:01 +01:00
Andreas Kling
3eb6c22a22
WindowServer: Make the menubar clock work again in the post-kernel world.
...
This is actually so much better. Grabbing directly at the RTC was silly. :^)
2019-02-17 01:05:53 +01:00
Andreas Kling
640360e958
Move WindowServer to userspace.
...
This is a monster patch that required changing a whole bunch of things.
There are performance and stability issues all over the place, but it works.
Pretty cool, I have to admit :^)
2019-02-17 00:13:47 +01:00
Andreas Kling
c3d36a5fe9
WindowServer: Prune more kernel-related gunk.
2019-02-16 12:25:47 +01:00
Andreas Kling
468113422f
Kernel: Add ioctls to BochsVGADevice for mode setting and page flipping.
...
Use these in WindowServer instead of poking at the BochsVGADevice directly.
2019-02-16 10:26:01 +01:00
Andreas Kling
dc200923f2
WindowServer: Ignore attempts to make menu windows the active window.
2019-02-14 10:56:45 +01:00
Andreas Kling
7c53171b0a
WindowServer: Add debug logging if we try to activate a client-less window.
2019-02-14 10:53:28 +01:00
Andreas Kling
7723c06f27
WindowServer: Make WSMenu use WSClientConnection::post_message().
2019-02-14 10:45:27 +01:00
Andreas Kling
c4703bedea
WindowServer: Get rid of the WSWindow lock now that accesses are serial.
2019-02-14 10:35:56 +01:00
Andreas Kling
aa7947c889
WindowServer: Add WSClientConnection class to manage an individual client.
...
This makes both object lifetimes and object ID's a lot easier to understand.
2019-02-14 08:22:47 +01:00
Andreas Kling
f529b845ec
WindowServer: Convert entire API to be message-based.
...
One big step towards userspace WindowServer. :^)
2019-02-14 01:21:32 +01:00
Andreas Kling
ef4e9860fd
WindowServer: Convert the remaining menu APIs into messages.
2019-02-13 21:47:14 +01:00
Andreas Kling
cf432b4c3d
WindowServer: Refactor more of the menu APIs to be message-based.
...
This is all pretty verbose but I can whittle it down later. :^)
2019-02-13 18:49:23 +01:00
Andreas Kling
fbbf57b61c
Rename GUI_Event to GUI_ServerMessage.
...
Now that communication is becoming bidirectional, "event" is no longer right.
2019-02-13 17:59:38 +01:00
Andreas Kling
4f98a35beb
WindowServer: Begin refactoring towards a fully asynchronous protocol.
...
In order to move the WindowServer to userspace, I have to eliminate its
dependence on system call facilities. The communication channel with each
client needs to be message-based in both directions.
2019-02-13 17:54:30 +01:00
Andreas Kling
1d758fd2ce
WindowServer: Don't spawn new processes with WindowServer as parent.
...
I don't want to have to wait() on them from the WindowServer. Let's just set
new processes free and someone else will take care of them.
2019-02-13 09:53:21 +01:00
Andreas Kling
c5a00a56c8
WindowServer: Put a clock in the top right corner of the screen.
...
This way we don't even need the Clock app anymore. Very cool :^)
2019-02-13 09:27:08 +01:00
Andreas Kling
cac8153436
WindowServer: Try out a new IterationDecision thing for lambda iteration.
2019-02-13 01:04:11 +01:00
Andreas Kling
732f273949
WindowServer: Switch menubar based on the currently active window.
2019-02-13 00:19:21 +01:00
Andreas Kling
4f33fb3a1a
WindowServer: Process window mouse events in the correct z-order.
2019-02-12 23:56:19 +01:00
Andreas Kling
1d7fc866ee
WindowServer: Menu windows shouldn't steal focus when clicked.
2019-02-12 16:34:47 +01:00
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
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
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
3c863e0ffa
WindowServer: Make automatic menu dismissal feel more "natural."
2019-02-11 13:59:26 +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
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
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
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
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