Commit Graph

23 Commits

Author SHA1 Message Date
Hüseyin ASLITÜRK
d18f6e82eb LibGUI: Replace up and down arrows with emoji 2020-05-20 13:40:24 +02:00
Andreas Kling
191073000e WindowServer: Remove WindowManager::invalidate(Window) API's
Instead, we now tell Windows to invalidate themselves. Window will then
pass on the requests to Compositor.

My basic idea here is that WindowManager should do window management,
dealing with incoming events, moving, resizing, etc. Compositor should
deal with painting the window stack in the right order with the least
amount of effort. :^)
2020-05-20 08:31:46 +02:00
Andreas Kling
10699b347f WindowServer: Move occlusion things from WindowManager to Compositor 2020-05-20 08:31:46 +02:00
Andreas Kling
ecea904ce9 WindowServer: Always send mouse events to the full-screen window
Full-screen mode is pleasantly exclusive, so we only need to send the
incoming mouse events to the active full-screen window.

This fixes an issue where clicking on the area normally covered by
the menubar while in full-screen mode would not send mouse events to
the full-screen window.
2020-05-19 18:14:19 +02:00
Andreas Kling
c1827d9766 WindowServer: Ignore overlap when compositing full-screen windows
Normally we walk the window stack to see if a given dirty rect is
covered by an opaque window. When the active window is full-screened,
we can skip this check and just unconditionally paint the window.

This fixes an issue where windows with higher inherent z-order (like
the taskbar and menu windows) would get cursor ghosting in them while
a normal window was full-screened.

Fixes #2289.
2020-05-19 17:59:13 +02:00
Shannon Booth
195c1784ba WindowServer: Rename WindowManager wm_config() to config()
It looked a little silly with all of the callers saying wm.wm
2020-05-18 14:34:57 +02:00
Shannon Booth
d3eccf0409 WindowServer: Make some WindowManager member functions const 2020-05-18 14:34:57 +02:00
Shannon Booth
1048283186 WindowServer: Remove uneeded const_casts for getting a submenu 2020-05-18 14:34:57 +02:00
Shannon Booth
41471eb3ae WindowServer: Add const version of Menu::find_menu_by_id(int menu_id)
It's a little sad having two diferent versions of this function, but I
don't know of any better way to do it. This also gets rid of some const
casts down the line.
2020-05-18 14:34:57 +02:00
Shannon Booth
08064ed219 WindowServer: Add const qualified version of MenuItem::submenu() 2020-05-18 14:34:57 +02:00
Andreas Kling
cd29844632 LibIPC: Allow opt-in UTF-8 validation on message parameters
You can now mark String message parameters with the [UTF8] attribute.
This will cause the generated decoder to perform UTF-8 validation and
reject the message if the given parameter is not a valid UTF-8 string.

This frees up the receiving side from having to do this validation at
a higher level.
2020-05-16 14:13:09 +02:00
Shannon Booth
df43e09433 LibGUI+WindowServer: Allow applications to set custom cursor bitmaps
This will allow e.g PaintBrush to use custom cursors for each tool.
2020-05-16 09:44:55 +02:00
Andreas Kling
244efe050a Clipboard: Move the system clipboard to a dedicated service process :^)
This commit moves the clipboard from WindowServer into a new Clipboard
service program. Clipboard runs as the unprivileged "clipboard" user
and with a much tighter pledge than WindowServer.

To keep things working as before, all GUI::Application users now make
a connection to Clipboard after making the connection to WindowServer.
It could be interesting to connect to Clipboard on demand, but right
now that would necessitate expanding every GUI app's pledge to include
"unix" and also unveiling the clipboard portal, which I prefer not to.
2020-05-14 22:53:58 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
DexesTTP
aab998e776 WindowServer: Invalidate the cursor when setting an override cursor 2020-05-13 09:33:37 +02:00
Andreas Kling
c2b5519ce2 LibGUI+WindowServer: Allow apps to use the "move" cursor :^) 2020-05-13 00:16:40 +02:00
Andreas Kling
f2058a39bf WindowServer: Shade the bottom of the menu bar like a button
This adds a row of secondary (darker) shade to the menubar, giving it
a more buttonish look to match the highlight added to the Taskbar. :^)
2020-05-10 22:32:12 +02:00
Andreas Kling
c6f098c5a9 WindowServer: Add 2px of tasteful space above maximized windows
This makes the visual interaction between the menu bar and the window
a lot less janky looking.
2020-05-10 14:46:23 +02:00
Shannon Booth
eb43e2d544 WindowServer: Add basic search functionality in menus
Perform a case insensitive search through the current menu. Jump to the
first item matching all keys in the current search. Backspace can clear
the current search, and the search will timeout after 3 seconds.
2020-05-10 13:34:51 +02:00
Shannon Booth
d5c40899cb WindowServer: Rework and simplify Menu event handling
The menu manager will now send events directly to the current menu.
Previously if a menu was opened it would always be set as the current
menu. Now when opening a menu you can optionally say that you do not
want to have it as the current menu.

One scenerio when this happens is when a menu is popped up as part of a
preview, for example, when hovering over a menu item that is a submenu.

Sending the event to the current menu simplifies things and solves a few
inconsistencies in bevhaviour (such as hovering over a submenu, but key
events not being sent to the submenu).
2020-05-10 13:34:51 +02:00
Shannon Booth
b1c83e5a64 WindowServer: Remove stray semicolon 2020-05-10 13:34:51 +02:00
Andreas Kling
7aa2acefd0 WindowServer: Cancel any ongoing input tracking when a menu pops up
When the user opens a context menu by right-clicking on something,
we now immediately stop sending mouse events to whoever was doing
active input window tracking before.

There are probably more situations where we should do this, and maybe
there's also a more generic way to express it, but this works for now.
2020-05-09 16:40:13 +02:00
Andreas Kling
cf3b58fbe8 Services: Renamed from Servers
It didn't feel right to have a "DHCPClient" in a "Servers" directory.
Rename this to Services to better reflect the type of programs we'll
be putting in there.
2020-05-08 21:57:44 +02:00