1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 21:55:07 +00:00
Commit graph

148 commits

Author SHA1 Message Date
Andreas Kling
d17a91f185 Move WindowServer into Servers. 2019-03-20 04:34:14 +01:00
Andreas Kling
b87c099535 WindowServer: Don't allow Logo+RMB to resize blocked-by-modal windows. 2019-03-19 01:40:41 +01:00
Andreas Kling
43304d2adf WindowServer: Add special treatment for modal windows.
While a WSClientConnection has a modal window showing, non-modal windows
belonging to that client are not sent any events.
2019-03-19 00:52:39 +01:00
Andreas Kling
4e451c1e92 Add client-side double buffering of window backing stores.
This prevents flicker and looks rather good. The main downside is that
resizing gets even more sluggish. That's the price we pay for now.
2019-03-17 04:23:54 +01:00
Andreas Kling
49f273c4ca WindowServer: Fix crash when initiating resize from a window edge. 2019-03-14 18:49:12 +01:00
Andreas Kling
64237c5028 WindowServer: Show the username of the WindowServer owner in the menu. 2019-03-10 03:16:27 +01:00
Andreas Kling
a149ad9b44 WindowServer: Window iteration should see the highlight window "in front". 2019-03-10 02:33:43 +01:00
Andreas Kling
2336d43abc WindowServer: Tweak CPU usage history color. 2019-03-10 01:22:36 +01:00
Andreas Kling
94df0c1ba6 WindowServer: Fix bug where window content could bleed through menus.
We have to iterate using for_each_visible_window_from_back_to_front()
if we want every window in the correct order.
2019-03-10 01:08:21 +01:00
Andreas Kling
272a41d02d WindowServer: Skip composing windows where entire dirty rect is covered.
If another window is currently in front of us and is fully opaque,
we can just skip to the next window. This avoids a whole lot of painting
with overlapping windows. :^)
2019-03-09 21:38:28 +01:00
Andreas Kling
ffe4522316 SharedGraphics: Allow passing a Font to text drawing functions.
This way we don't have to juggle around with calls to Painter::set_font()
which simplifies a bunch of places.
2019-03-09 21:24:12 +01:00
Andreas Kling
b1c272a507 WindowServer: Initiating a window drag/resize should also make frontmost. 2019-03-09 17:10:53 +01:00
Andreas Kling
684c52941d WindowServer: Always clip window updates to the window's outer rect. 2019-03-09 17:03:08 +01:00
Andreas Kling
88f6ce152f SharedGraphics: Add PainterStateSaver RAII helper and Point::operator-().
Two little things to help tidy up a bit in WSWindowManager.
2019-03-09 16:54:41 +01:00
Andreas Kling
f40d11f06d LibGUI+WindowServer: Implement drag-to-select behavior in GTextEditor.
To make this feel right, I needed to start passing keyboard modifiers along
with mouse events. That allows shift-clicking to extend the selection. :^)
2019-03-08 17:53:02 +01:00
Andreas Kling
1e0971c8b4 WindowServer: Fix slightly off alignment of menubar clock. 2019-03-08 01:31:03 +01:00
Andreas Kling
c9c40e1da6 Base+WindowServer: Add a new default wallpaper for fun. 2019-03-07 23:58:04 +01:00
Andreas Kling
67ee579113 WindowServer: Add window icons. Every window has the same icon for now.
The icons show up both in the title bars and in the window switcher.
Eventually I'd like to be able to minimize to icon, and maybe even have
myself a taskbar.
2019-03-06 23:03:36 +01:00
Andreas Kling
495c4f940d WindowServer: Only the left mouse button should initiate window drag. 2019-03-06 22:38:19 +01:00
Andreas Kling
eedfb2649e WindowServer: Tweak appearance of window close buttons. 2019-03-06 22:36:37 +01:00
Andreas Kling
5773b91a04 WindowServer: Use the right font for computing titlebar text rects. 2019-03-06 22:34:45 +01:00
Andreas Kling
66a5ddd94a More work on the variable-width font support.
Katica is now the default system font, and it looks quite nice. :^)
I'm gonna need to refine the GTextBox movement stuff eventually,
but it works well-enough for basic editing now.
2019-03-06 14:06:40 +01:00
Andreas Kling
0a86366c71 Make a preparation pass for variable-width fonts. 2019-03-06 11:03:10 +01:00
Andreas Kling
b85fe0bd07 WindowServer: Let the window switcher render itself as a WSWindow.
Much better than drawing directly into the back buffer.
2019-03-06 10:03:10 +01:00
Andreas Kling
f3ff402cf3 WindowServer: Store the mouse button state in one variable.
This makes the logic around it a lot less verbose.
2019-03-05 14:13:07 +01:00
Andreas Kling
b67d0a3632 WindowServer: Determine resizing "hot corner" based on window's outer rect. 2019-03-04 11:34:25 +01:00
Andreas Kling
5c27e74fac WindowServer: Add a window switcher.
This needs some work on the window ordering and things like that, but it
works quite nicely as a starting point.

The keyboard shortcut is Logo+Tab. :^)
2019-03-03 15:17:05 +01:00
Andreas Kling
b4631d2083 WindowManager: Allow moving windows around using Logo+LMB. 2019-03-03 13:18:58 +01:00
Andreas Kling
57fe316e01 Detect the "Logo" (Windows/Apple/whatever) key and use it for window resize.
This will be comfortable enough while I'm still developing with emulators.
QEMU keeps eating my "Alt" key presses and it's making things difficult.
2019-03-03 12:56:48 +01:00
Andreas Kling
6c2089c59d Put miscellaneous debug spam behind #ifdefs. 2019-03-01 10:51:58 +01:00
Andreas Kling
b5e5f26a82 Base: Add Csilla Bold 7x10 variant.
It's nice to have a thin and a bold variant to complement each other.
2019-03-01 02:50:50 +01:00
Andreas Kling
fd428d6ed3 SharedGraphics: Make Painter clipping work with translated clip origin. 2019-02-28 18:57:36 +01:00
Andreas Kling
05f9257621 WindowServer: Add "Open ProcessManager..." to system menu.
This will no doubt come in handy. :^)
2019-02-28 11:36:50 +01:00
Andreas Kling
c80182f81f WindowServer: Add 1920x1080 resolution option.
Because it's fun to go fullscreen on my development machine. :^)
2019-02-26 14:11:01 +01:00
Andreas Kling
f6b41d166d WindowServer: Reduce resize related debug spam. 2019-02-26 12:47:45 +01:00
Andreas Kling
88e77fe3af WindowServer: Bump height of window titlebars and menus from 16 to 18. 2019-02-26 11:04:14 +01:00
Andreas Kling
1effe70543 WindowServer+LibGUI: Fix global mouse tracking with recursive widget trees.
Also avoid sending multiple copies of mouse events to global trackers.
2019-02-26 10:34:05 +01:00
Andreas Kling
2fb3fa7f69 WindowServer: Add a simple CPU usage graph to the global menu bar.
This is pretty cute and helps me spot when something's chewing up CPU.
2019-02-26 02:17:25 +01:00
Andreas Kling
b341cab9cc WindowServer: Only invalidate the menubar rect when an app changes menubar. 2019-02-26 01:07:10 +01:00
Andreas Kling
d77f8ba413 WindowServer: Make message receivers be weak pointers. 2019-02-26 00:54:10 +01:00
Andreas Kling
15fb917f28 Convert more RetainPtr use to Retained. 2019-02-25 16:04:08 +01:00
Andreas Kling
b6115ee5b7 WindowServer: Choose resizing direction based on where it's initiated.
Divide the window into 3x3 hot areas and resize in the direction of the
corner where the resize starts. The middle is a no-op area.

This needs some polish but the basic mechanism is good.
2019-02-21 11:06:37 +01:00
Andreas Kling
6084cd0c56 Add concept of size increments to windowing system.
Use this to implement incremental resizing for Terminal so that we only
ever resize to fit a perfect number of rows and columns.

This is very nice. :^)
2019-02-21 00:21:23 +01:00
Andreas Kling
fa02d2a39b Rework the rendering model so that clients instantiate backing stores.
This makes interactive resizing work a lot better, althought it's still not
perfect. There are still glitches and unpleasant flashes of zeroed memory.
2019-02-20 22:08:14 +01:00
Andreas Kling
d054fbee91 WindowServer: Don't spam clients with resize events.
Wait for them to finish a paint, then send them a new resize event.
The exception is when releasing the mouse button to end the resize.
Then we send a new resize event right away.
2019-02-20 15:50:05 +01:00
Andreas Kling
59b8183c4b WindowServer: Support resizing windows.
This is pretty limited and not entirely stable, but it does work! :^)
2019-02-20 15:34:55 +01:00
Andreas Kling
a9911fca80 WindowServer: Minor style tweak. 2019-02-20 13:59:13 +01:00
Andreas Kling
96943dbad1 WindowServer: Remove some unused WSWindowManager members. 2019-02-20 13:17:09 +01:00
Andreas Kling
bf30502560 LibGUI: Implement enter/leave events (with WindowServer support.)
Windows now learn when the mouse cursor leaves or enters them.
Use this to implement GWidget::{enter,leave}_event() and use that
to implement the CoolBar button effect. :^)
2019-02-20 10:12:19 +01:00
Andreas Kling
57546d8420 WindowServer: Only invalidate the menubar rect when switching menubars. 2019-02-19 16:32:06 +01:00