Commit Graph

50 Commits

Author SHA1 Message Date
Robin Burchell
0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Christopher Dumas
c23882dde1 can now tile background and made sure the IRC choose server popup still works 2019-05-27 21:40:53 +02:00
Christopher Dumas
e3f81bce49 IRC client setttings, Terminal settings, more WM settings 2019-05-27 21:40:53 +02:00
Christopher Dumas
63486b8438 implemented settings for window manager. 2019-05-27 21:40:53 +02:00
Christopher Dumas
d4a16d6031 Network stack is now configurable, and resolution is also configurable, but loading cursors causes a page-fault? 2019-05-27 21:40:53 +02:00
Andreas Kling
d0bc21b96f WindowServer: Remove some unused WSWindowManager members. 2019-05-24 21:11:55 +02:00
Andreas Kling
ad908f1395 WindowServer: Factor out compositing from WSWindowManager into WSCompositor.
This is far from finished and the two classes are awkwardly grabbing at each
other's innards, but here's a first step in the right direction.
2019-05-24 19:32:46 +02:00
Robin Burchell
ec0d598934 WSWindowManager: Add double click to maximize/restore 2019-05-18 15:54:10 +02:00
Andreas Kling
33d0916d29 WindowServer: Add support for fullscreen windows.
Fullscreen windows are rendered alone and above everything else when they
are active, and as part of the regular window stack order when something
else is active.

Currently windows cannot be made fullscreen after-the-fact, but must have
the fullscreen flag included in their CreateWindow message.

It should not possible to interact with the menu, taskbar or window frame
while the active window is fullscreened. :^)
2019-05-17 22:33:19 +02:00
Robin Burchell
a4b0dfff43 Move double click events from LibGUI to the window server 2019-05-15 22:45:28 +02:00
Andreas Kling
8c4b7fe385 WindowServer: Make the ordering in the window switcher a bit more sane. 2019-05-13 00:08:56 +02:00
Andreas Kling
641893104a WindowServer: Add a maximize/unmaximize button to windows. 2019-05-12 21:32:02 +02:00
Andreas Kling
ea9a39a9f2 LibGUI+WindowServer: Add a GResizeCorner widget.
This widget is automatically included in GStatusBar, but can be added in
any other place, too. When clicked (with the left button), it initiates a
window resize (using a WM request.)

In this patch I also fixed up some issues with override cursors being
cleared after the WindowServer finishes a drag or resize.
2019-05-03 01:38:24 +02:00
Andreas Kling
6614746ca8 WindowServer: Spawn a secondary thread to decode wallpapers.
The threading API's are not very mature, so this code looks a bit crufty
but it does take the load off the WindowServer main thread when changing
wallpapers. :^)
2019-05-01 16:07:47 +02:00
Andreas Kling
956bd23aae WindowServer+TaskBar: Add a taskbar window button popup menu.
This patch only hooks up the minimize and unminimize actions.
2019-04-23 23:14:14 +02:00
Andreas Kling
62f7e8ac62 WindowServer: WSButton should be more discerning with MouseUp/MouseMove. 2019-04-23 01:17:20 +02:00
Andreas Kling
49e7ffc06a WindowServer: Introduce a WM event mask so Taskbar can ignore window rects.
Taskbar was waking up to do nothing every time a window rect changed.
2019-04-20 14:40:59 +02:00
Andreas Kling
b88f2bc799 WindowServer: Broadcast window icons to newly joined WM listener clients. 2019-04-18 19:42:48 +02:00
Andreas Kling
c931eaa22c WindowServer: Generate a separate WM event for window icon changes. 2019-04-18 00:39:11 +02:00
Andreas Kling
94a5e08faf WindowServer: Rename WSMessage* => WSEvent*.
Since I'm on a roll here, I'll just rename WSMessageFoo to WSEventFoo now
that these inherit from CEventFoo anyway.
2019-04-14 05:23:37 +02:00
Andreas Kling
de184d0999 WindowServer: Port WindowServer to LibCore.
This was pretty straightforward thanks to the work I did separating out
LibCore from LibGUI already. :^)

- WSMessageLoop now inherits from CEventLoop.
- WSMessage now inherits from CEvent.
- WSMessageReceiver goes away.

Now there is only one event loop in Serenity. Very nice!
2019-04-14 05:15:22 +02:00
Andreas Kling
c2093ad994 WindowServer: Move the CPU monitor thingy to its own class. 2019-04-14 04:33:43 +02:00
Andreas Kling
3f6408919f AK: Improve smart pointer ergonomics a bit. 2019-04-14 02:36:06 +02:00
Andreas Kling
c09c114d77 WindowServer+LibGUI: Add ability to set per-window icons.
The icons are passed around as filesystem paths for now, since the shared
memory bitmaps only support 2 sides.
2019-04-13 16:59:55 +02:00
Andreas Kling
30e2d62c38 WindowServer: Factor out some parts of compose().
The main compositing loop was getting pretty unwieldy. Break out some parts
into functions so it's more understandable.
2019-04-10 13:51:47 +02:00
Andreas Kling
1ab99903af WindowServer: Display the window geometry while it's being moved or resized. 2019-04-09 17:17:30 +02:00
Andreas Kling
7f2eeb0b35 LibGUI+WindowServer: Add support for GWidget tooltips.
Any GWidget can have a tooltip and it will automatically pop up below the
center of the widget when hovered. GActions added to GToolBars will use
the action text() as their tooltip automagically. :^)
2019-04-08 18:58:44 +02:00
Andreas Kling
c7365a00f8 WindowServer: Add ability to initiate window resize from window edges. 2019-04-06 23:20:06 +02:00
Andreas Kling
0808d5158c WindowServer: Make WSButton a Weakable and stop rawly pointing to it.
We had a crash due to dereferencing a destroyed WSButton after clicking
a window close button. Avoid that problem by using WeakPtr.
2019-04-06 21:17:02 +02:00
Andreas Kling
d89d759c36 WindowServer: Pick a new active window when the active window is minimized.
Also use the same logic when the active window is removed.
2019-04-06 20:50:38 +02:00
Andreas Kling
f12573cb63 Add a slight hover highlight to GButton and WSButton. :^) 2019-04-06 04:08:09 +02:00
Andreas Kling
ef9fbef4c6 Taskbar: Show minimized window titles in [brackets].
Had to plumb the minimization state from WindowServer to Toolbar in order
to implement this.
2019-04-06 00:58:30 +02:00
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
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
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
1374195a0d WindowServer: Broadcast the full window list to new WM listener clients. 2019-04-04 13:33:09 +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
96104b5524 Taskbar: More bringup work. We now see a basic window list. 2019-04-04 01:44:35 +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
6673284b06 LibGUI: Switch to a resizing cursor when hovering or using a GSplitter.
Also expose the various standard cursors on WSWindowManager so they can
be reused by the override mechanism.
2019-04-02 02:34:09 +02:00
Andreas Kling
0cad4bdc90 WindowServer: Make various function arguments const. 2019-04-01 19:14:57 +02:00
Andreas Kling
42c95959a8 WindowServer: Show a special "move" cursor when dragging windows around. 2019-03-31 22:42:13 +02:00
Andreas Kling
c992534f73 WindowServer: Show directional cursors when resizing windows. 2019-03-31 22:27:37 +02:00
Andreas Kling
2334ffcbf8 WindowServer: Add a WSCursor class (a bitmap and a hotspot.)
Also import a bunch of cursors I drew. Only the default ("arrow") cursor is
ever used so far.
2019-03-31 22:09:10 +02:00
Andreas Kling
e84823360d WindowServer: Moving a window to front should always activate it.
So instead of having move_to_front() + set_active_window(), let's have
move_to_front_and_make_active().
2019-03-24 13:09:46 +01:00
Andreas Kling
56ee8bfe2a WindowServer: Factor out ongoing drag/resize from process_mouse_event().
The mouse event processing code is getting unwieldy. Break out two huge
chunks into separate functions so the code becomes easier to work with.
2019-03-24 13:00:12 +01:00
Andreas Kling
e4dfd5a3a4 WindowServer: Support PNG wallpapers.
Fix up /bin/pape so it tells the WindowServer which wallpaper file to use.
2019-03-21 15:54:19 +01:00
Andreas Kling
d17a91f185 Move WindowServer into Servers. 2019-03-20 04:34:14 +01:00