Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
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.
|
|
This was broken by 31d659d.
|
|
This lets us launch proper handler application for symlinks :^)
|
|
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.
|
|
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.
|
|
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>
|
|
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
|
|
|
|
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.
|
|
We need to pass --now to `shutdown` command.
|
|
This replaces a bunch of very basic uses of posix_spawn() with the new
Core::Process::spawn().
|
|
|
|
Application::quit() is nicer for most cases where exit() is used. Cases
where exit() is used intentionally for early termination are left
intact.
|
|
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.
|
|
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.
|
|
|
|
Modal windows cannot be pinned and thus we end up drawing 2 separators.
|
|
This was breaking many places which didn't expect text to wrap. Now,
the only place where text currently wraps is in GUI::Label.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
This thing seems to work fine, no need to hang on to old debug code.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
`FileOperation Move ...` is now used for cut-and-paste in the
FileManager.
|
|
This is in preparation for a perform_move() function.
|
|
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.
|
|
(And some adjustments based on MaxWipfli's feedback)
|
|
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!
|
|
Also mark them as [[nodiscard]].
|
|
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.
|
|
|
|
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.
|
|
Users can specify the row and column of the virtual desktop, and
WindowServer will animate to it.
|
|
Fixes #8869
|
|
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.
|
|
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).
|
|
This makes sure we don't needlessly render areas with transparency
that used to be occupied by an overlay.
|
|
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.
|
|
This will expose the client id of the WindowServerConnection this
instance of FileSystemAccessServer is using.
|
|
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.
|