Robin Burchell
f55965b5e8
WindowServer/GMenu: Adjust the popup position to fit the window inside the screen
...
Rather than passing a "top_anchored" bool. Fixes #22 .
2019-05-16 01:22:54 +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
dab9901235
WindowServer+LibGUI: Handle mouse wheel deltas in the mouse event stream.
...
The wheel events will end up in GWidget::mousewheel_event(GMouseEvent&)
on the client-side. This patch also implements basic wheel scrolling in
GScrollableWidget via this mechanism. :^)
2019-05-13 19:52:57 +02:00
Andreas Kling
852d648912
Fix "make clean" not deleting app binaries.
2019-05-13 14:56:18 +02:00
Andreas Kling
42cf09fdf1
WindowServer: Don't add maximize button to non-resizable windows.
...
The minimize button can stay though, since it doesn't change the window
size, just the visibility. :^)
2019-05-13 00:48:54 +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
a20ce4d2b8
WindowServer: Rearrange minimize/maximize/close buttons (in that order.)
2019-05-12 21:33:25 +02:00
Andreas Kling
641893104a
WindowServer: Add a maximize/unmaximize button to windows.
2019-05-12 21:32:02 +02:00
Andreas Kling
dddf45f563
Change String&& arguments to const String& in a couple of places.
...
String&& is more nuisance than anything, and the codegen improvement is
basically negligible since the underlying type is already retainable.
2019-05-12 14:57:15 +02:00
Andreas Kling
23e6c45e87
WindowServer: Show downscaled window thumbnails in the window switcher.
2019-05-12 04:15:25 +02:00
Andreas Kling
c9951bbe60
WindowServer: Improve window frames by giving them a raised frame look. :^)
2019-05-11 01:31:10 +02:00
Andreas Kling
d8ae6c31ce
LibGUI+WindowServer: Improve checkmark appearance.
2019-05-10 22:50:42 +02:00
Andreas Kling
99aead4857
Kernel: Add a writev() syscall for writing multiple buffers in one go.
...
We then use this immediately in the WindowServer/LibGUI communication in
order to send both message + optional "extra data" with a single syscall.
2019-05-10 03:19:25 +02:00
Andreas Kling
5b2e122624
WindowServer: Don't launch a terminal when clicking system menu separators.
...
The menu item for launching a terminal was sharing ID's with the separators.
2019-05-07 17:11:28 +02:00
Andreas Kling
8750f93201
WindowServer: Don't invalidate the cursor on left button state change.
...
This was needed back when pressing the left button would cause the cursor
to switch colors.
2019-05-07 03:56:54 +02:00
Andreas Kling
dc919352b0
WindowServer: Don't send Paint messages to minimized windows.
...
There's no point in painting if it can't be seen anyway. We also make sure
to request a repaint when un-minimizing, so the window gets a chance to
repaint itself then.
2019-05-04 23:59:04 +02:00
Andreas Kling
6a5d92f0ad
WindowServer+LibGUI: Allow changing whether windows have alpha channels.
...
Use this in Terminal to tell the window server to not bother with the alpha
channel in the backing store if we're running without transparency.
Semi-transparent terminals look neat but they slow everything down, so this
keeps things fast while making it easy to switch to the flashy mode. :^)
2019-05-03 21:07:16 +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
288e97a206
WindowServer+LibGUI: Wait for the extra_data to arrive.
...
Since the sockets we use are non-blocking, just slap a select before the
second call to read(). This fixes some flakiness seen under load.
This should eventually work a bit differently, we could use recv() once
it has MSG_WAITALL, and we should not let WindowServer handle all the
client connections on the main thread. But for now, this works.
Fixes #24 .
2019-05-01 18:28:33 +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
d7270059ab
WindowServer: Tweak window minimize button appearance.
2019-04-30 15:09:40 +02:00
Andreas Kling
c8aae534d7
WindowServer: Make WSMenu wide enough that shortcuts are always rightmost.
2019-04-29 23:41:48 +02:00
Andreas Kling
ed957ca2e1
WindowServer: Add 1280x720 resolution to the system menu.
2019-04-28 05:24:52 +02:00
Andreas Kling
8f81a3f9dd
LibGUI+WindowServer: Make it possible to have checkable GActions.
...
They show up as checkable GButtons in GToolBar, and with (or without) check
marks in menus.
There are a bunch of places to make use of this. This patch only takes
advantage of it in the FileManager for the view type actions.
2019-04-26 21:09:56 +02:00
Andreas Kling
de4b77ef27
WindowServer: Ignore title change notifications for non-normal windows.
2019-04-25 17:38:16 +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
e2cd572e60
WindowServer: Add some padding to the window switcher items.
2019-04-23 22:01:33 +02:00
Andreas Kling
f520d87097
WindowServer: Remove debug spam about activating non-normal windows.
2019-04-23 20:46:10 +02:00
Andreas Kling
58240fdb33
Do a pass of compiler warning fixes.
...
This is really making me question not using 64-bit integers more.
2019-04-23 13:00:53 +02:00
Andreas Kling
62f7e8ac62
WindowServer: WSButton should be more discerning with MouseUp/MouseMove.
2019-04-23 01:17:20 +02:00
Andreas Kling
9f122bff5a
WindowServer+LibGUI: Allow arbitrary number of rects in messages.
...
To get truly atomic updates, add a mechanism for passing arbitrary amounts
of extra data along with WindowServer messages. This allows us to pass all
the rects in a single message.
2019-04-22 01:15:47 +02:00
Andreas Kling
84f96c393c
WindowServer: Limit paint request rects to the visible window rect.
...
Don't send unnecessarily large paint requests to clients. This avoids some
unnecessary work and fixes choppiness when dragging widgets outside the
visible part of a VisualBuilder form.
2019-04-21 04:20:29 +02:00
Andreas Kling
57da00b731
Include Makefile.common in all other Makefiles.
2019-04-21 04:09:39 +02:00
Andreas Kling
7234900f61
WindowServer+LibGUI: Coalesce multiple client paints into GMultiPaintEvents.
...
This allows GWindow to paint up to 32 separate rects before telling the
WindowServer to flip the buffers. Quite a bit smoother. :^)
2019-04-20 17:38:51 +02:00
Andreas Kling
7efd61fcf5
WindowSerer+LibGUI: Send multiple rects in invalidation/flush messages.
...
This patch moves to sending up to 32 rects at a time when coordinating the
painting between WindowServer and its clients. Rects are also merged into
a minimal DisjointRectSet on the server side before painting.
Interactive resize looks a lot better after this change, since we can
usually do all the repainting needed in one go.
2019-04-20 17:23:35 +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
ab94a6be00
AK: Add String::copy(BufferType) helper.
...
This will create a String from any BufferType that has data() and size().
2019-04-20 14:13:40 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
6aead8998a
WindowServer: Fix minor header dependency issue.
2019-04-20 12:49:11 +02:00
Andreas Kling
3c0afccca0
WindowServer: Improve the look of menu separators.
2019-04-18 19:58:25 +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
e74b5bc054
ProcessManager+WindowServer: Do a little less malloc() in CPU monitor code.
2019-04-18 03:37:01 +02:00
Andreas Kling
c7d6e568ba
WindowServer: Tweak window icon placement again.
2019-04-18 02:11:44 +02:00
Andreas Kling
f6b4013329
WindowServer: Make window title bars slightly thicker. :^)
2019-04-18 01:45:52 +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
c4c7f224d5
WindowServer: Use CFile in the CPU monitor code.
2019-04-18 00:12:04 +02:00
Andreas Kling
18ef6b111b
WindowServer: Mouse switching between system menu and app menu was broken.
2019-04-17 12:06:09 +02:00
Andreas Kling
486ed41fd2
WindowServer: Tweak window icon placement.
2019-04-16 22:37:46 +02:00
Andreas Kling
86361d3d45
WindowServer: Improve the look of menus.
...
This patch makes menus stand out a bit more from their background by using
the same kind of shading that Windows 2000 had.
2019-04-16 17:02:26 +02:00
Andreas Kling
311019d8ee
WindowServer: Don't waste time pre-filling windows with background color.
...
There's a subsequent pass that fills whatever the backing store didn't
cover anyway, just a few lines later. This was all wasted work.
2019-04-16 15:10:57 +02:00