Various changes are needed to support this:
- The directory is created by Core::Account on login (and located in
/tmp).
- Service's sockets are now deleted on exit (to allow re-creation)
- SystemServer needs to handle SIGTERM to correctly destroy services.
We now remove default route and set IP address to 0.0.0.0 (Kernel
interprets this as "link down") for all disabled interfaces, so that
a reboot is no longer needed.
Currently in case of multiple notifications, the notifications are
drawn on top of each other when expanded.
The change moves the notificaiton below other notifications
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
Error::from_string_literal now takes direct char const*s, while
Error::from_string_view does what Error::from_string_literal used to do:
taking StringViews. This change will remove the need to insert `sv`
after error strings when returning string literal errors once
StringView(char const*) is removed.
No functional changes.
This commit moves the length calculations out to be directly on the
StringView users. This is an important step towards the goal of removing
StringView(char const*), as it moves the responsibility of calculating
the size of the string to the user of the StringView (which will prevent
naive uses causing OOB access).
When compiling with Lagom, we give both LibWebSocket and the WebSocket
IPC service the Lagom:: prefix as an alias, but strip the Lib from all
library target names before applying the prefix. This creates a conflict
when external projects used the aliased name between the server and the
library. Give WebSocket a name that deconflicts it, but keep the binary
name the same, /bin/WebSocket.
Add overrides for serenity_bin and serenity_lib to allow the actual
CMakeLists.txt from Userland to be used to build as many services as
possible without adding more clutter to Meta/Lagom/CMakeLists.txt
At least macOS has a non-standard sin_len field at the front of
the struct that Linux and Serenity do not. On BSDs, the
sin_len field must be initialized to the size of the structure.
Co-Authored-By: Timon Kruiper <timonkruiper@gmail.com>
This commit has no behavior changes.
In particular, this does not fix any of the wrong uses of the previous
default parameter (which used to be 'false', meaning "only replace the
first occurence in the string"). It simply replaces the default uses by
String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
This makes the page automatically update to reflect the system theme
when in "Color Scheme > Follow System Theme" mode without having to
manually cause a style update.
I already fixed the crash from this in #14470, but didn't fully fix
the issue. Currently the browser just avoids sending the
inspect_dom_node() IPC call for non-visible nodes.
The main problem with this is it means the browser keeps displaying
the overlay for the previously selected node. This commit fixes
the crash in the WebContent side, so the IPC call can still be made
and the selection correctly updated.
These functions were changed to synchronous in #13870 but
the async_ versions were still being called. This led to
frequent crashes when loading local files in Browser.
To achieve this goal:
- The Browser unveils "/tmp/portal/filesystemaccess"
- Pass the page through LoadRequest => ResourceLoader
- ResourceLoader requests a file to the FileSystemAccessServer via IPC
- OutOfProcessWebView handles it and sends a file descriptor back to
the Page.
This allows us to make sure that those operations are performed
in the right order. Affected functions are:
- add_window_stealing_for_client
- set_window_parent_from_client
- remove_window_stealing_for_client
- remove_window_stealing
Before this patch, when you called FileSystemAccessServer::Client::try_*
twice, the second call used the same variable to store the promise. This
"race condition" is now solved using a HashMap, to store multiple
parallel requests.
This removes some old cruft to refactor the hardware buffer-related
datastructures into depending on a single constant, which determines the
number of samples per hardware buffer that the audio server mixes. This
is set to 1024 as before, so there are no functional changes.
If the request is stopped RequestServer::did_finish_request() will crash
on the VERIFY() call since request.total_size.has_value() returns false.
Let us instead use a conditional expression to verify if it has a value
and then call async_request_finished().
Adds some logic to reposition menus that would appear off the right or
bottom edge of the screen so they appear completely on screen.
Co-authored-by: Sam Atkins <atkinssj@gmail.com>
Previously we would assume that the theme would only change through the
taskbar menu. As the theme can also be changed in DisplaySettings, the
selected theme in the taskbar menu would get out of sync.
With this patch the menu will get updated every time the theme changes
and the menu is not shown.
Rather than enabling/disabling cursor highlighting by going into mouse
settings, you can now instead toggle it any time with Super+H. Mouse
settings now is only for customising the look of the highlighting.
This is a bit of a hack, but it is an easy way to finally get spacers
into GML.
This will translate well if spacers are later to become child objects of
the continer widget.
Simply setting m_current_cursor in current_cursor_was_reloaded() does
not setup the cursor animation, that has to be done in change_cursor().
This also fixes the cursor disappearing after switching from an animated
cursor back to a normal one (which was due to it trying to draw a cursor
frame that did not exist).
SystemServer now invokes services with the same uid as the process that
made the request.
This allows the superuser to have a normal GUI workflow. For example,
read and write its own files in TextEditor.