summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2021-07-15SpiceAgent: Add Clipboard as a build dependencyGunnar Beutner
SpiceAgent depends on header files built as part of the Clipboard target.
2021-07-14LibWeb: Add OOPWV IPC for selecting all textTimothy Flynn
2021-07-14LibWeb: Add OOPWV IPC for retrieving selected textTimothy Flynn
2021-07-14WindowServer: Don't use GNU-style designatorDaniel Bertalan
Clang throws a fit when it encounters this code, since we already have the standardized designated initializer syntax in C++20, which we should use.
2021-07-14SpiceAgent: Support copying and pasting imagesx-yl
2021-07-14SpiceAgent: Add a new spice agent service :^)x-yl
A SPICE agent communicates with the host OS to provide nifty features like clipboard sharing :^) This patch implements only plain-text clipboard sharing. See: github.com/freedesktop/spice-protocol/blob/master/spice/vd_agent.h
2021-07-13KeyboardPreferenceLoader: Use correct default Num Lock config valueForLoveOfCats
2021-07-12TaskbarWindow: Redraw start button when default font changesLuK1337
2021-07-11FileSystemAccessServer: Return user_picked_value even on errorAdam Hodgen
If a user picks a file which can't be opened for some reason, we should still return the value, so client applications can report the error along with the chosen filepath.
2021-07-10WindowServer: Flush display buffer when flashingTom
If the device requires a flush and we modify the front buffer, we need to flush those changes to the front buffer. This makes the flashing work using the VirtIOGPU. Also fix a minor bug where we flushed the front buffer instead of the back buffer after flipping, which caused the VirtIOGPU to not work as expected when using the SDL backend and disabling buffer flipping.
2021-07-10FileSystemAccessServer: Add service for accessing veiled files nicelyTimothy
Adds new service FileSystemAccessServer which allows programs to request a file descriptor for any file on the file system. The user can be prompted to choose the path with a FilePicker, or the path can be provided by the application which will show a MessageBox showing the pid and name of the calling process and allows the user to approve or deny the request.
2021-07-10Taskbar: Scale window icon bitmap if it's not 16x16LuK1337
Fixes: #5806
2021-07-09LibThreading: Rename Lock => MutexAndreas Kling
2021-07-09WindowServer: Paint background when a fullscreen window is transparentAziz Berkay Yesilyurt
The windows in the background are ignored when the window is fullscreen. However, we still would like to see the background if that window is transparent.
2021-07-09Revert "Userland: Add ability to screenshot rectangular region in `shot` ↵Ali Mohammad Pur
(#8515)" This reverts commit 1c06d772628a0191289fe30edcc143e29ba2ca32. This was squashed by mistake, the rebased version will follow.
2021-07-09Userland: Add ability to screenshot rectangular region in `shot` (#8515)Aziz Berkay Yesilyurt
* LibGUI: Verify m_window_id is not-zero in set_maximized Window::set_maximized requires non-zero window id to be a valid call, i.e. calling Window::show beforehand. A verify statement before the server call can help developers by hinting correct usage. * LibGUI: Paint background when the fullscreen window is transparent The windows in the background are ignored when the window is fullscreen. However, we still would like to see the background if that window is transparent. * Userland: Add ability to capture rectangular region in shot A click and drag selectable, transparent, fullscreen window is displayed with the command line argument -r for screenshots.
2021-07-08Taskbar: Make clicks at the edges and corners work as expectedAndrea Martinelli
This makes it easy for the user to just throw the mouse at the corner of the screen and obtain the desired outcome (eg. opening the start menu), without having to precisely position the cursor over one of the buttons.
2021-07-08WindowServer: Add missing minimize check to highlighted window callbacknetworkException
This patch adds a missing minimize check for highligted windows in WindowStack::for_each_visible_window_of_type_from_front_to_back(). Minimized windows should not be treated as visible in this context. Previously, iterating through each visible Window when recomputing occlusions in the Compositor would cause a crash if a highlighted Window is also minimized at the same time. As the WindowSwitcher currently highligts Windows even when they are minimized, opening it while any Window is minimized would cause WindowServer to crash.
2021-07-08WindowServer: Remove rect behind window icon in WindowSwitchernetworkException
This patch removes the background behind window icons in the WindowSwitcher which looked like it was being rendered incorrectly (without alpha) previously.
2021-07-08LibSQL+SQLServer: Build SQLServer system serviceJan de Visser
This patch introduces the SQLServer system server. This service is supposed to be the only process/application talking to database storage. This makes things like locking and caching more reliable, easier to implement, and more efficient. In LibSQL we added a client component that does the ugly IPC nitty- gritty for you. All that's needed is setting a number of event handler lambdas and you can connect to databases and execute statements on them. Applications that wish to use this SQLClient class obviously need to link LibSQL and LibIPC.
2021-07-08WindowServer: Add a new IPC to set the cursor positionAndrea Martinelli
2021-07-08ChessEngine: Don't call non-constexpr `sqrt` in a constexpr intiializerDaniel Bertalan
GCC likely has a builtin intrinsic that evaluates the operation at compile-time, even if the `LibM` is not declared as constexpr. Clang, however, does not like it, and it failed to compile this code.
2021-07-08Everywhere: Add braces to aggregate initializersDaniel Bertalan
This fixes a couple of warnings emitted by Clang.
2021-07-08Everywhere: Add break after the last case label before `default`Daniel Bertalan
We already do this in most places, so the style should be consistent. Also, Clang does not like it, as this could cause an unexpected compile error if some statements are added to the default label or a new label is added above it.
2021-07-08Everywhere: Forward declare structs as structsDaniel Bertalan
While structs being forward declared as classes is not strictly an issue, Clang complains as this is not portable code, since some ABIs treat classes declared as `class` and `struct` differently. It's easier to fix these than to reason about explicitly disabling another warning.
2021-07-08IPCCompiler+WindowServer: Fix deleted function warningDaniel Bertalan
It might be the case that we are passing non-movable/non-copyable things through IPC. In this case, Clang will emit a warning as it can't generate the requested default move/copy ctor for the IPC message. To fix this, we use a `#pragma` to make the compiler silently ignore our request. The same was the case with the three-way comparison in `Screen`. Since we don't use the three-way comparison operator anywhere else in our codebase, we simply use the `==` operator instead.
2021-07-08WindowServer: Don't use old GNU-style designatorDaniel Bertalan
Since we use C++20, we can move to the new standardized designated initializer syntax.
2021-07-08Everywhere: Remove unused local variables and lambda capturesDaniel Bertalan
2021-07-08WindowServer: Make descending into submenu make the submenu currentAndrew January
This fixes a bug with menu keyboard navigation. If you pressed the right arrow to enter a submenu, then the left arrow to exit the submenu, then right and left again it would leave no menu item selected. Because descending into the submenu wasn't making it the current menu, when you press the left arrow it couldn't find the "current menu" in the stack, so didn't know what menu to pop back to. It was an accident that it worked the first time you navigated into the menu. Selecting the parent item also opened the submenu, and opening an already open menu sets it as the current menu. After closing the submenu with the left arrow, it is no longer already open, so it wasn't getting set as the current menu.
2021-07-08WindowServer: When "flash flush" enabled, flash transparent rects greenAndreas Kling
2021-07-08WindowServer: Allow partial repaints in window frame & menubarsAndreas Kling
Before this change, invalidating any rect in a WindowFrame would cause the entire window (including frame & drop shadow) to get invalidated, leading to copious amounts of overdraw when mousing over menubars, titlebars, and window buttons. We now simply allow the partial frame invalidations through to the window's dirty rects collection and the compositor takes care of it.
2021-07-08WindowServer: Close submenus when hovering over separatorsAndrew January
ec6debb changed item_index_at to return -1 when hovering over a separator. The intent was to not send the separator to clients for MenuItemEntered. However, this had the unintented consequence of not closing the submenu when you hover over a separator. Submenus ignore when the item index is -1 in order to leave the menu open when you move the mouse outside. This ends up leaving the submenu open without the highlight to show what menu item the submenu belongs to. A slightly less severe consequence is that pressing the up or down arrow key in such a situation would now go the top or bottom of the menu rather than the item above or below the separator. We now push the special casing of separators into set_hovered_index so that the rest of the code behaves as it did before ec6debb.
2021-07-07WindowServer+wsctl: Add a simple utility for toggling "flash flush"Andreas Kling
You can now put the WindowServer into "flash flush" mode by doing: $ wsctl -f 1 To disable it, somewhat obviously: $ wsctl -f 0
2021-07-07WindowServer: When "flash flush" is enabled, stretch flash to 10 msAndreas Kling
Previously, this mode would flash flush/repaint rects in yellow for however it long it took for the compositor to replace the yellow with the final image instead. Now we usleep() for 10 ms when flashing, so you get a chance to see the yellow. This immediately makes "flash flush" mode super useful. :^)
2021-07-07WindowServer: Add WindowFrame::invalidate_menubar() and use itAndreas Kling
Clean up a FIXME about overly aggressive invalidation.
2021-07-07LibGfx+LibGUI+WindowServer: Use move() on Core::AnonymousBuffer moreAndreas Kling
2021-07-07WindowServer: Allow windows to be pinnable (always on top)Andres Crucitti
This patch adds the concept of a window being "Pinnable" (always drawn on top of other windows). This can be toggled through a new checkable action in the top left corner's window menu.
2021-07-07Kernel+KeyboardSettings: Remove numlock syscall and implement ioctlEdwin Hoksberg
2021-07-05WindowServer: Fix crash removing modal windowsTom
Calling Window::is_modal requires the window to be on a window stack, so we need to check this before removing it from the window stack.
2021-07-05KeyboardSettings+Kernel: Setting to enable Num Lock on loginForLoveOfCats
2021-07-05WindowServer: Improve screen invalidation on window state changesTom
Because window states and various flags can affect the windows' rendered areas it's safer to use the last computed occlusion rectangles to invalidate areas on the screen that may have to be re-rendered due to e.g. a window size change. Fixes #6723
2021-07-04WindowServer: Query driver for framebuffer offsetTom
Depending on the driver, the second buffer may not be located right after the first, e.g. it may be page aligned. This removes this assumption and queries the driver for the appropriate offset.
2021-07-04WindowServer: Implement support for combined buffer flipping + flushingTom
Some devices may require DMA transfers to flush the updated buffer areas prior to flipping. For those devices we track the areas that require flushing prior to the next flip. For devices that do not support flipping, but require flushing, we'll simply flush after updating the front buffer. This also adds a small optimization that skips these steps entirely for a screen that doesn't have any updates that need to be rendered.
2021-07-04WindowServer+LibGUI: Add a way to force a window to have a drop shadowAndreas Kling
2021-07-04WindowServer: Make most remaining WindowServer IPC calls asyncAndreas Kling
The only remaining sync call from client to server is now the call that switches a window's backing store. That one actually relies on the synchronization to hand over ownership of the backing stores, so it has to stay synchronous for now.
2021-07-04Taskbar: Simplify quick launch widget layoutAndreas Kling
Use shrink-to-fit instead of manually calculating the widget size.
2021-07-04Taskbar: Give the "Show/Hide Desktop" button an icon :^)Andreas Kling
2021-07-04WindowServer: Only run window animation for windows on current desktopTom
We should only run the minimize and launch animations for windows that are actually rendered on the currently visible virtual desktop.
2021-07-04WindowServer: Toggling desktop should only toggle current desktopTom
We should only show/hide the windows on the current virtual desktop.
2021-07-04Taskbar: Add show desktop button to toggle showing of the desktopForLoveOfCats