summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2021-08-12SystemServer: Generalize chown_all_framebuffer_devices functionLiav A
Instead of neatly searching for all framebuffer device nodes and changing ownership of them, let's generalize this function so we can apply the same pattern on tty nodes.
2021-08-12Userland: Fix PATH environment variable orderingJean-Baptiste Boric
2021-08-10SystemServer: Change group ownership on all framebuffer devicesLiav A
WindowServer was not able to utilize any other framebuffer device in the /dev directory due to wrong group ownership of other framebuffer devices. Therefore we need to ensure that when SystemServer starts, it checks all directory entries in /dev, searching for framebuffer devices, and then apply the correct ownership for them.
2021-08-10LaunchServer: Make sure launching absolute symlinks worksGunnar Beutner
This was broken by 31d659d.
2021-08-10LaunchServer: Resolve symlinks when querying for handler applicationLuK1337
This lets us launch proper handler application for symlinks :^)
2021-08-09LaunchServer: Do not provide file handlers for special filesTetsui Ohkubo
With this change, LaunchServer will always return an empty list of file handlers for special files e.g. sockets and devices. Before this change, TextEditor was always returned as a default handler for these files.
2021-08-08FileOperation: Don't follow symlinksAndreas Kling
Deleting a symlink via "FileOperation Delete" should not recursively delete whatever the symlink is pointing to. Same basic idea applies to the Copy and Move operations.
2021-08-08WindowServer: Fix Clang crash when compiling Compositor.cppDaniel Bertalan
Due to a bug in Clang 12, the compilation would fail with an 'unexpected end-of-file' error when it encounters some of the nested generic lambdas in `Compositor.cpp`. Co-authored-by: Peter Bindels <dascandy@gmail.com>
2021-08-08WindowServer: Fix 'use of GNU old-style field designator'Daniel Bertalan
Since C99 and C++20 have a standardized syntax for designated initializer, we should use that instead of this GCC-specific extension. While this currently works both in Clang and GCC, the former emits a warning for it, while the latter has an [issue] open that plans to deprecate it. [issue]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88144
2021-08-07FileSystemAccessServer: Add window title as parameter for opening fileTimothy
2021-08-07SystemServer: Handle missing service executable gracefullyBrian Gianforcaro
I use the `configure-components` functionality locally during development. There are a few services (SpiceAgent) which aren't marked as required components, and hence aren't built in all configurations, but we still try to launch them in all configurations. Instead of letting the forked SystemServer process crash, lets gracefully handle the situation of a missing binary and provide a message to the user.
2021-08-07Taskbar: Pass full argv for exit actionLuK1337
We need to pass --now to `shutdown` command.
2021-08-06Userland: Use Core::Process::spawn() instead of posix_spawn() in placesAndreas Kling
This replaces a bunch of very basic uses of posix_spawn() with the new Core::Process::spawn().
2021-08-04Taskbar: Use provided AppFile icon instead of finding it ourselvesJelle Raaijmakers
2021-08-03Everywhere: Replace most cases of exit() with Application::quit()Timothy
Application::quit() is nicer for most cases where exit() is used. Cases where exit() is used intentionally for early termination are left intact.
2021-08-03Taskbar: Set chdir to the home directory when opening applicationsKarol Kosek
Although the chdir was set up for the applications opened from the quick launch, the regular application list hadn't do this. This meant that you could open a Terminal or HackStudio project in the root directory, which isn't so bad, but it's better to stick to the user home directory.
2021-08-02LibGUI, WindowServer: Greatly simplify menubar logicsin-ack
Currently, any number of menubars can be plugged in and out of a window. This is unnecessary complexity, since we only need one menubar on a window. This commit removes most of the logic for dynamically attaching and detaching menubars and makes one menubar always available. The menubar is only considered existent if it has at least a single menu in it (in other words, an empty menubar will not be shown). This commit additionally fixes a bug wherein menus added after a menubar has been attached would not have their rects properly setup, and would therefore appear glitched out on the top left corner of the menubar.
2021-08-01Services: Remove unused header includesBrian Gianforcaro
2021-07-28WindowServer: Don't draw separator between pin window & close for modalsLuK1337
Modal windows cannot be pinned and thus we end up drawing 2 separators.
2021-07-27Userland: Make TextWrapping::Wrap opt-insin-ack
This was breaking many places which didn't expect text to wrap. Now, the only place where text currently wraps is in GUI::Label.
2021-07-27LibGfx: Remove Gfx::ImageDecoder::bitmap() in favor of frame(index)Andreas Kling
To transparently support multi-frame images, all decoder plugins have already been updated to return their only bitmap for frame(0). This patch completes the remaining cleanup work by removing the ImageDecoder::bitmap() API and having all clients call frame() instead.
2021-07-27LibGfx: Improve ImageDecoder constructionAndreas Kling
Previously, ImageDecoder::create() would return a NonnullRefPtr and could not "fail", although the returned decoder may be "invalid" which you then had to check anyway. The new interface looks like this: static RefPtr<Gfx::ImageDecoder> try_create(ReadonlyBytes); This simplifies ImageDecoder since it no longer has to worry about its validity. Client code gets slightly clearer as well.
2021-07-26NotificationServer: Expand the notification when hoveredsin-ack
Now, instead of showing a tooltip, the entire notification will be shown when the user hovers over a notification. In the future, limiting the amount of lines shown within the notification and moving extra lines to the tooltip again might be a good idea.
2021-07-26Userland: Move text wrapping/elision into the new TextLayout :^)sin-ack
This class now contains all the fun bits about laying out text in a rect. It will handle line wrapping at a certain width, cutting off lines that don't fit the given rect, and handling text elision. Painter::draw_text now internally uses this. Future work here would be not laying out text twice (once actually preparing the lines to be rendered and once to get the bounding box), and possibly adding left elision if necessary. Additionally, this commit makes the Utf32View versions of Painter::draw_text convert to Utf8View internally. The intention is to completely remove those versions, but they're kept at the moment to keep the scope of this PR small.
2021-07-26Taskbar: Unbreak application launchers in the start menuAndreas Kling
Application launcher actions reference their applications by an index into the global `g_apps` table. When skipping over settings apps, we still have to increment the current app identifier.
2021-07-26Taskbar: Show Settings app instead of Settings app categoryAndreas Kling
The Settings app is basically a viewer for the Settings app category anyway, so let's just direct users there instead of having the various settings apps in the start menu.
2021-07-25WindowServer: Remove debug spam in MenuManager::refresh()Andreas Kling
2021-07-22CrashDaemon: Remove BACKTRACE_DEBUG debugging codeAndreas Kling
This thing seems to work fine, no need to hang on to old debug code.
2021-07-22WindowServer: Fix rendering overlays when there's no desktop windowTom
We were missing to account for areas that are not covered by any window. If any of these areas are covered by an overlay we need to render the wallpaper into transparency and also render the overlay over them. This fixes not rendering overlays properly when e.g. the FileManager (desktop) crashed as there is no longer any window underneath.
2021-07-22LaunchServer: Remove debug spam about incoming connectionsAndreas Kling
2021-07-22FileOperation: Use LexicalPath::join() for all path joiningSam Atkins
2021-07-22FileOperation: Implement 'Delete' operationSam Atkins
2021-07-22FileOperation: Combine 'sources' and 'destination' CL argumentsSam Atkins
The upcoming 'Delete' operation has no destination, so this was the best solution we could come up with for now. Perhaps ArgsParser could support sub-commands, so we would define 'Copy', 'Move' and 'Delete' each as sub-commands with their own argument definitions. That would make things like git's variety of commands possible.
2021-07-22FileManager+FileOperation: Implement (and use) 'Move' commandSam Atkins
`FileOperation Move ...` is now used for cut-and-paste in the FileManager.
2021-07-22FileOperation: Extract execute_work_items() from perform_copy()Sam Atkins
This is in preparation for a perform_move() function.
2021-07-22FileOperation: Accept multiple source argumentsSam Atkins
You can now list multiple files or directories and they will all be copied to the destination. :^) Note that this means you can pass the same file or directory multiple times. It runs fine, just means that it does unnecessary work. But figuring out if a file is already queued is probably more hassle than it's worth, if it's even possible at all due to symlinks.
2021-07-22FileManager+FileOperation: Switch to east constSam Atkins
(And some adjustments based on MaxWipfli's feedback)
2021-07-22WindowServer: Reuse config variable from the class on theme changeKarol Kosek
When changing the theme, there were two Core::ConfigFile instances (one class scoped -- m_config and one function scoped -- wm_config) fighting over the file, resulting in not saving the new theme name to the config. :^( This makes WindowServer remember selected theme from the menu after reboot!
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-21WindowServer: Re-use existing Screen instances and improve fallbacksTom
If a screen layout cannot be applied, instead of failing to start WindowServer try to fall back to an auto-generated screen layout with the devices that are detected. Also, be a bit smarter about changing the current screen layout. Instead of closing all framebuffers and bringing them back up, keep what we can and only change resolution on those that we need to change them on. To make this work we also need to move away from using an array of structures to hold compositor related per-screen data to attaching it to the Screen itself, which makes re-using a screen much simpler.
2021-07-20Taskbar: Update the start button width when system fonts changeAndreas Kling
2021-07-20Taskbar: Launch apps in Terminal when RunInTerminal=true is specifiedLinus Groh
This feels a bit awkward right now, and needs code duplication - I think adding a mechanism to the AppFile class to run the executable would be neat, especially if we add an arguments field to app files - but this will do for now.
2021-07-19WindowServer: Add set_virtual_dekstop WindowManager messagePeter Elliott
Users can specify the row and column of the virtual desktop, and WindowServer will animate to it.
2021-07-19WindowServer: Fix crash rendering fullscreen windowTom
Fixes #8869
2021-07-18WindowServer: Fix menu over-drawingTom
We only need to re-draw the item being selected and the item being deselected. We also don't care anymore if applets were added or removed as we no longer have a global menu bar.
2021-07-18WindowServer: Fix compositor overdraw issues related to transparencyTom
We were re-rendering areas that were considered transparency areas even though they weren't transparency areas or were occluded by opaque areas. In order to fix this, we need to be a bit smarter about what is above and below any given window. Even though a window may have transparent areas, if those are occluded by opaque window areas on top they are not actually any areas that should be rendered at all. And the opposite also applies, opaque window areas for windows below that are occluded by transparent areas, do need to be rendered as transparency. This solves the problem of unnecessary transparency areas. The other problem is that we need to know what areas of a window's dirty rectangles affect other windows, and where. Basically any opaque area that is somehow below a transparent area that isn't otherwise occluded, and any transparent area above any other window area (transparent or opaque) needs to be marked dirty prior to composing. This makes sure that all affected windows render these areas in the correct order. To track these, we now have a map of affected windows and the rectangles that are affected (because not all of that window's transparency areas may be affected).
2021-07-18WindowServer: Recompute occlusions when removing an overlayTom
This makes sure we don't needlessly render areas with transparency that used to be occupied by an overlay.
2021-07-18WindowServer: Let clients mark windows as stealable by specific clientsTimothy
This implements window stealing in WindowServer, which allows clients to mark a window they own as 'stealable' by another client. Indicating that the other client may use it for any purpose. This also updates set_window_parent_from_id so that the client must first mark its window as stealable before allowing other clients to use it as a parent.
2021-07-18FileSystemAccessServer: Add expose_window_server_client_id()Timothy
This will expose the client id of the WindowServerConnection this instance of FileSystemAccessServer is using.
2021-07-18FileSystemAccessServer+TextEditor: Implement cross-process modal promptsTimothy
This transitions from synchronous IPC calls to asynchronous IPC calls provided through a synchronous interface in LibFileSystemAccessClient which allows the parent Application to stay responsive. It achieves this with Promise which is pumping the Application event loop while waiting for the Dialog to respond with the user's action. LibFileSystemAccessClient provides a lazy singleton which also ensures that FileSystemAccessServer is running in the event of a crash. This also transitions TextEditor into using LibFileSystemAccessClient.