Commit graph

1181 commits

Author SHA1 Message Date
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
269f9ae524 WindowServer: Forgot to actually set 'had_any_timer' after we had any timer. 2019-02-13 09:38:32 +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
961783e0df Let's have makeall.sh build with make -j2.
The full rebuild keeps getting slower, this makes it a bit more bearable.
2019-02-12 16:34:19 +01:00
Andreas Kling
5500a13491 Meta: Update ReadMe with a new screenshot. :^) 2019-02-12 15:47:37 +01:00
Andreas Kling
000ccc0a03 Base: Adjust the OS logo icon a little bit. 2019-02-12 15:46:32 +01:00
Andreas Kling
fd99382004 Launcher: Remove button for guitest. 2019-02-12 15:24:25 +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
d6326d6c2e LibGUI: Add a GFontDatabase class that lets you enumerate fonts and more.
"More" in this case being also giving you the ability to load a font by name.
Use this as backend for Terminal's font menu. :^)
2019-02-12 14:36:19 +01:00
Andreas Kling
7df7e5e2a6 Base: Add some human-friendly spaces to font names.
"LizaRegular" => "Liza Regular", etc.
2019-02-12 14:34:37 +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
3085e400bc LibGUI: Add GAction class and make GMenu deal in actions rather than strings. 2019-02-12 14:09:48 +01:00
Andreas Kling
a5a7ea3d1e Base: Rename Liza8x10 to LizaThin8x10. 2019-02-12 13:31:00 +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
27df572381 AK: Fix bug in MMX memcpy() unaligned prologue handling. 2019-02-12 12:39:04 +01:00
Andreas Kling
7ce15f1c54 Fix some compilation warnings. 2019-02-12 12:11:22 +01:00
Andreas Kling
f3c8821b0f Bootloader: Bump sector count once again.
This is starting to get cramped. I wonder how much longer this hilarious
frankenloader will be able to boot us.
2019-02-12 12:09:50 +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
111589a558 Kernel: Make sure processes always start out with fds 0, 1 and 2 open.
If we don't have a TTY for the process, fall back to /dev/null.
2019-02-12 11:25:25 +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
f311d0f353 Kernel: Don't bother trying to pass environment to init's testing processes. 2019-02-12 10:19:52 +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
431e7bf085 PS2MouseDevice: Add current buffer size to debug logging. 2019-02-12 09:22:55 +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
757429fb55 LibGUI: More work on client-side menus. 2019-02-11 15:37:12 +01:00
Andreas Kling
c75ecaae32 Terminal: Move the notifier into the Terminal class. 2019-02-11 15:07:05 +01:00
Andreas Kling
3351f1ccc1 Port all apps to GApplication. 2019-02-11 14:56:23 +01:00
Andreas Kling
9483b39227 LibGUI: Add GMenu* and GApplication classes. 2019-02-11 14:43:43 +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
14c0f18de9 Kernel: Update block cache on write.
If a block is present in the cache, just overwrite the cached block.
2019-02-11 13:18:24 +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
f8951afe17 Ext2FS: Fix broken logic for accessing inode and block bitmaps.
This logic only worked for the very first block group.
2019-02-11 12:46:56 +01:00
Andreas Kling
fd5136a1ab AK: Oops, the optimization in Vector::append(Vector&&) was broken.
It forgot to clear out the moved-from vector. It's easy to see where this bug
came from: I assumed m_impl was an OwnPtr. It would be comfy if move() on some
arbitrary T* would also null it out but alas that's not how things work.
2019-02-11 12:44:59 +01:00
Andreas Kling
298a49c688 IDEDiskDevice: Detect disk errors and report failure to clients.
Previously we'd just fail silently if there was an I/O error of any kind.
2019-02-11 11:38:14 +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