Commit Graph

1812 Commits

Author SHA1 Message Date
Andreas Kling
f6ca94605c WindowServer: Add a window minimization button.
The window is simply ignored in the painting and hit testing traversal
when in minimized state, same as we do for invisible windows.

The WM_SetActiveWindow message (sent by Taskbar) brings it back into the
non-minimized state. :^)
2019-04-05 22:32:00 +02:00
Andreas Kling
0fc3ccaa52 WindowServer: Make WSButton behave more like a normal button.
Previously it would just close the window on MouseDown. Now we do the normal
thing where we require a MouseUp inside the button rect before committing.
2019-04-05 21:53:45 +02:00
Andreas Kling
0d60c56b51 WindowServer: Make WSWindowFrame and WSButton deal in relative coordinates.
This was a bit painful to get right. The code is a lot more pleasant to
deal with now that all coordinates are relative to their local system
instead of being absolute screen coordinates.
2019-04-05 21:33:34 +02:00
Andreas Kling
2ac2d79a8e WindowServer: Simplify two mouse coordinate conversions. 2019-04-05 20:27:12 +02:00
Andreas Kling
3155a2e128 WindowServer: Add a WSButton class and make the window close buttons use it. 2019-04-05 18:40:36 +02:00
Andreas Kling
9fbac66a91 Hack sync.sh script to retry umount after a short delay if it fails.
I keep accumulated unwanted mounts because umount sometimes fails.
2019-04-05 16:26:29 +02:00
Andreas Kling
47d270b577 WindowServer: Factor out window frame logic into a WSWindowFrame class.
The window frame is an object that contains a window, its title bar and
window border. This way WSWindowManager doesn't have to know about all the
different types of window borders, titlebar rects, etc.
2019-04-05 15:54:56 +02:00
Andreas Kling
99b98dc653 WindowServer: Merge WM_WindowAdded and WM_WindowStateChanged.
These events are identical, so it's silly to send both. Just broadcast
window state changes everywhere instead, it doesn't matter when it was
added as clients are learning about this asynchronously anyway.
2019-04-05 15:01:28 +02:00
Andreas Kling
329cc60a92 NetworkTask: Add a combined alarm for the all network adapters.
This way we can go back to snoozing in the receiver task and stop chewing
up the CPU. :^)
2019-04-05 05:14:20 +02:00
Andreas Kling
bcc00857a4 AK: Revert Eternal<T> for now since it doesn't work as intended. 2019-04-05 05:14:20 +02:00
Andreas Kling
fb6dc5350d Meta: Tweak build instructions. 2019-04-05 04:02:36 +02:00
Andreas Kling
89fc5de28d Meta: Give the build instructions a more accurate title. 2019-04-05 04:01:36 +02:00
Andreas Kling
9de7a0daaf AK: Fix problem when building i686-pc-serenity toolchain from scratch. 2019-04-05 03:58:40 +02:00
Andreas Kling
dd966c03c9 Meta: Add build instructions about LibM headers. 2019-04-05 03:58:16 +02:00
Andreas Kling
667b4ad13b Meta: Add build instructions. 2019-04-05 03:54:40 +02:00
Andreas Kling
e19d38e742 LibC: Add some missing stuff in stdint.h for libstdc++. 2019-04-05 03:37:01 +02:00
Andreas Kling
6f5ee79fe1 Meta: Add patches for building binutils and GCC for i686-pc-serenity. 2019-04-05 03:02:52 +02:00
Andreas Kling
6df5e3f51a Kernel: Build with i686-pc-serenity-g++.
This works just fine, and now we only need one cross-compiler. :^)
2019-04-05 02:56:23 +02:00
Andreas Kling
ec7817af37 Kernel: Spawn /bin/Taskbar on startup.
I think it's good enough now to be there by default. :^)
2019-04-04 20:19:07 +02:00
Andreas Kling
6280dee625 Taskbar: Make the window buttons slightly wider. 2019-04-04 20:12:09 +02:00
Andreas Kling
02b523f9cd WindowServer: Clip dirty cursor rects to the screen in compose(). 2019-04-04 17:36:28 +02:00
Andreas Kling
8f38c01600 WindowServer: WM_SetActiveWindow should move the window to front as well. 2019-04-04 16:38:42 +02:00
Andreas Kling
64a5abf8db Taskbar: Only include "Normal" windows in the taskbar window list. 2019-04-04 16:23:23 +02:00
Andreas Kling
82b02ed82b LibGUI: Use TextElision::Right for GButton captions. 2019-04-04 15:20:02 +02:00
Andreas Kling
4533539e8a Painter: Add text elision support (only right-hand side supported.)
Some window titles didn't fit on the taskbar buttons, so I needed a way
to collapse the remaining part of the text into "..."
2019-04-04 15:19:04 +02:00
Andreas Kling
ce7341be87 WindowServer: Add WM_SetActiveWindow client request and use it in Taskbar.
This makes it possible for Taskbar to switch windows. :^)
2019-04-04 14:38:53 +02:00
Andreas Kling
8a50218190 Taskbar: Left-align the text on taskbar window buttons. 2019-04-04 14:16:09 +02:00
Andreas Kling
89c544d97b LibGUI: Allow specifying GButton text alignment. 2019-04-04 14:15:57 +02:00
Andreas Kling
1374195a0d WindowServer: Broadcast the full window list to new WM listener clients. 2019-04-04 13:33:09 +02:00
Andreas Kling
9e1682c265 WindowServer: Remove some unused debugging code. 2019-04-04 13:23:59 +02:00
Andreas Kling
7b1384c4ef Taskbar: Plumb window active state from the WindowServer to the taskbar. 2019-04-04 13:19:26 +02:00
Andreas Kling
19eb814850 LibGUI: Make it possible for GButton to be checkable. 2019-04-04 13:18:27 +02:00
Andreas Kling
5ec121e194 Taskbar: Tweak margins to look just right. 2019-04-04 01:51:11 +02:00
Andreas Kling
e785dda3e7 Taskbar: TaskbarWidget doesn't need a custom paint_event(). 2019-04-04 01:50:04 +02:00
Andreas Kling
96104b5524 Taskbar: More bringup work. We now see a basic window list. 2019-04-04 01:44:35 +02:00
Andreas Kling
ea801a99dc Kernel: Bump per-process file descriptor limit to 128. 2019-04-03 23:48:59 +02:00
Andreas Kling
f1c5ee2c10 Taskbar: Remove an accidentally committed dependency file. 2019-04-03 23:48:40 +02:00
Andreas Kling
aa03a07e61 Taskbar+LibGUI: More work on bringup. 2019-04-03 21:04:16 +02:00
Andreas Kling
a22774ee3f Taskbar: Start working on a taskbar app.
I originally thought I would do this inside WindowServer, but let's try to
make it as a standalone app that communicates with WindowServer instead.
That will allow us to use LibGUI. :^)
2019-04-03 19:38:44 +02:00
Andreas Kling
318db1e48e WindowServer: Broadcast screen rect changes to all clients.
GUI clients can now obtain the screen rect via GDesktop::rect().
2019-04-03 17:22:14 +02:00
Andreas Kling
c02c9880b6 AK: Add Eternal<T> and use it in various places.
This is useful for static locals that never need to be destroyed:

Thing& Thing::the()
{
    static Eternal<Thing> the;
    return the;
}

The object will be allocated in data segment memory and will never have
its destructor invoked.
2019-04-03 16:52:25 +02:00
Andreas Kling
528054d192 GWindow: Don't ignore update(), it should repaint the whole window.
This was causing some apps to have an empty window on startup since the
call to update() in show() was effectively a no-op.
2019-04-03 15:54:16 +02:00
Andreas Kling
dde224fe44 FontEditor: Break out classes into separate files. 2019-04-03 15:23:13 +02:00
Andreas Kling
b9738fa8ac Kernel: Move VM-related files into Kernel/VM/.
Also break MemoryManager.{cpp,h} into one file per class.
2019-04-03 15:13:07 +02:00
Andreas Kling
39fd81174e Kernel: Tidy up kmalloc.cpp a tiny bit. 2019-04-03 14:41:40 +02:00
Andreas Kling
5b296718d8 GraphicsBitmap: Use MappedFile. 2019-04-03 14:32:45 +02:00
Andreas Kling
c0009e3173 PNGLoader: Use MappedFile. 2019-04-03 14:15:35 +02:00
Andreas Kling
3dc3754cde Font: Clean up AK::MappedFile and use it for mapping font files. 2019-04-03 13:51:49 +02:00
Andreas Kling
ab6bd3872b AK: Remove unused TemporaryFile class. 2019-04-03 13:20:08 +02:00
Andreas Kling
ce5d21ea19 Kernel: Remove unused Queue.h. 2019-04-03 13:19:45 +02:00