summaryrefslogtreecommitdiff
path: root/Services
AgeCommit message (Collapse)Author
2020-12-30WebContent: Pledge "recvfd" :^)Andreas Kling
This is needed so we can receive file descriptors from ProtocolServer. Fixes #4660.
2020-12-30ProtocolServer: Stream the downloaded data if possibleAnotherTest
This patchset makes ProtocolServer stream the downloads to its client (LibProtocol), and as such changes the download API; a possible download lifecycle could be as such: notation = client->server:'>', server->client:'<', pipe activity:'*' ``` > StartDownload(GET, url, headers, {}) < Response(0, fd 8) * {data, 1024b} < HeadersBecameAvailable(0, response_headers, 200) < DownloadProgress(0, 4K, 1024) * {data, 1024b} * {data, 1024b} < DownloadProgress(0, 4K, 2048) * {data, 1024b} < DownloadProgress(0, 4K, 1024) < DownloadFinished(0, true, 4K) ``` Since managing the received file descriptor is a pain, LibProtocol implements `Download::stream_into(OutputStream)`, which can be used to stream the download into any given output stream (be it a file, or memory, or writing stuff with a delay, etc.). Also, as some of the users of this API require all the downloaded data upfront, LibProtocol also implements `set_should_buffer_all_input()`, which causes the download instance to buffer all the data until the download is complete, and to call the `on_buffered_download_finish` hook.
2020-12-30WindowServer: Added IPC requests for getting and setting mouse settingsIdan Horowitz
These include the mouse acceleration factor and the scroll length step size.
2020-12-30WindowServer: Added configurable mouse acceleration and scroll lengthIdan Horowitz
The settings are also saved to the config file to survive reboots.
2020-12-30CrashDaemon: Move from Applications to ServicesAndreas Kling
2020-12-30LibGUI: Rewrite layout system in terms of min and max sizesAndreas Kling
This patch removes size policies and preferred sizes, and replaces them with min-size and max-size for each widget. Box layout now works in 3 passes: 1) Set all items (widgets/spacers) to their min-size 2) Distribute remaining space evenly, respecting max-size 3) Place widgets one after the other, adding spacing in between I've also added convenience helpers for setting a fixed size (which is the same as setting min-size and max-size to the same value.) This significantly reduces the verbosity of widget layout and makes GML a bit more pleasant to write, too. :^)
2020-12-30Taskbar: Set min/max size for taskbar buttonsAndreas Kling
This makes them shrink when the taskbar fills with too many buttons. It doesn't scale to infinity open windows, but it's better than them escaping off screen after 6 open windows. :^)
2020-12-28WindowServer: Add a GetGlobalCursorPosition IPC requestAndreas Kling
This tells you where the mouse cursor is in screen coordinates.
2020-12-28WindowServer: Remove unnecessary clang-format disabler commentAndreas Kling
2020-12-28WindowServer: Don't lookup configuration values in compose()Andreas Kling
The compose() function is supposed to be fast since it can execute 60 times per second. Let's not do obviously avoidable things like configuration value lookups in there. :^)
2020-12-28LibGUI: Make GUI::FileIconProvider::icon_for_executable() a public APIAndreas Kling
This way we can use it instead of icon_for_path() in a bunch of places and avoid loading the full FileIconProvider configuration.
2020-12-28Base: Rename maximize/minimize icons to a more generic nameIdan Horowitz
This reduces naming confusion when the icons are used for other use cases that require a triangle shape
2020-12-28WindowServer: Spruce up the move/resize geometry label a little bitAndreas Kling
Draw it in a threed style with a little shadow under it.
2020-12-28Everywhere: Move AppFile from LibGUI to LibDesktopLinus Groh
This was mentioned in #4574, and the more I think about it the more it feels just right - let's move it there! :^) Having to link LaunchServer against LibGUI explicitly should've been telling enough...
2020-12-28Services: Fix typosBrendan Coles
2020-12-27Kernel: Introduce the DevFSLiav A
The DevFS along with DevPtsFS give a complete solution for populating device nodes in /dev. The main purpose of DevFS is to eliminate the need of device nodes generation when building the system. Later on, DevFS will assist with exposing disk partition nodes.
2020-12-27AK: Use direct-list-initialization for Vector::empend() (#4564)Nathan Lanza
clang trunk with -std=c++20 doesn't seem to properly look for an aggregate initializer here when the type being constructed is a simple aggregate (e.g. `struct Thing { int a; int b; };`). This template fails to compile in a usage added 12/16/2020 in `AK/Trie.h`. Both forms of initialization are supposed to call the aggregate-initializers but direct-list-initialization delegating to aggregate initializers is a new addition in c++20 that might not be implemented yet.
2020-12-27Taskbar: Use GUI::AppFileLinus Groh
2020-12-27SystemMenu: Use GUI::AppFileLinus Groh
2020-12-27LaunchServer: Use GUI::AppFileLinus Groh
2020-12-27LibGUI+WindowServer: Tweak hover shadows slightlyAndreas Kling
Move the shadow 1 more pixel away from the unhovered icon location, making a total 2 pixel distance between the icon and the shadow. Also tweak the shadow color to be a darkened variant of the base color underneath the icon.
2020-12-26SystemServer: Set HOME for servicesSergey Bugaev
Fixes https://github.com/SerenityOS/serenity/issues/4484
2020-12-26SystemServer: Port to Core::AccountSergey Bugaev
We now have a handy Core::Account class that we can use instead of iterating over the passwd database ourselves.
2020-12-26LaunchServer: Remove icons from LaunchServer::HandlerLinus Groh
2020-12-25WindowServer: Validate cursor type in SetWindowCursor message handlerLinus Groh
Fixes #4536.
2020-12-25Everywhere: Tweak "2020-2020" => "2020" in copyright headersAndreas Kling
2020-12-24Taskbar: Use GUI::FileIconProvider for app iconsLinus Groh
2020-12-24SystemMenu: Use GUI::FileIconProvider for app iconsLinus Groh
2020-12-24LaunchServer: Ignore empty FileType / Protocol / [Launcher] config valuesLinus Groh
"Foo=" should be treated the same as "Foo" being missing.
2020-12-24LaunchServer+Base: Stop using Browser as default protocol handlerLinus Groh
Browser supports very few protocols (http, https, gemini, file) at the moment, so there's no point in using it as a catch-all and default protocol handler. I added an explicit association for gemini to /bin/Browser instead. This stops Desktop::Launcher::open() from reporting success for any URL, which really isn't the case (Browser shows an error page...).
2020-12-22LibCore: Rename identifiers that can clash with libc macros (#4127)Érico Nogueira Rolim
POSIX allows the default streams (stdin, stdout and stderr) to be macros, which means that on such systems (musl libc is one) building Lagom will fail due to the File::std*() names. Also fix any files that use these identifiers.
2020-12-21Everywhere: Switch from (void) to [[maybe_unused]] (#4473)Lenny Maiorani
Problem: - `(void)` simply casts the expression to void. This is understood to indicate that it is ignored, but this is really a compiler trick to get the compiler to not generate a warning. Solution: - Use the `[[maybe_unused]]` attribute to indicate the value is unused. Note: - Functions taking a `(void)` argument list have also been changed to `()` because this is not needed and shows up in the same grep command.
2020-12-19WindowServer: Put tooltip windows above notification windowsAndreas Kling
2020-12-19LibHTTP: Make HTTPRequest::from_raw_request() take a ReadonlyBytesAndreas Kling
This allows us to get rid of some ByteBuffer::wrap() usage.
2020-12-17WindowServer: Add the ability to animate cursorsTom
This adds the ability to specify cursor attributes as part of their file names, which allows us to remove hard coded values like the hot spot from the code. The attributes can be specified between the last two dots of the file name. Each attribute begins with a character, followed by one or more digits that specify a uint value. Supported attributes: x: The x-coordinate of the cursor hotspot y: The y-coordinate of the cursor hotspot f: The number of animated frames horizontally in the image t: The number of milliseconds per frame For example, the filename wait.f14t100.png specifies that the image contains 14 frames that should be cycled through at a rate of 100ms. The hotspot is not specified, so it defaults to the center.
2020-12-16EchoServer: Add a simple echo serverBrendan Coles
2020-12-16TelnetServer: replace getopt with LibCore ArgsParserBrendan Coles
2020-12-14LibWeb: Merge Document::layout() and Document::update_layout()Andreas Kling
There is now only Document::update_layout().
2020-12-13LibCore: Make IODevice::read_line() return a StringAndreas Kling
Almost everyone using this API actually wanted String instead of a ByteBuffer anyway, and there were a bunch of slightly different ways clients would convert to String. Let's just cut out all the confusion and make it return String. :^)
2020-12-08LibWeb+WebContent: Add on_load_finish hook to web viewsAndreas Kling
This isn't entirely symmetrical with on_load_start as it will also fire on reloads and back/forward navigations. However, it's good enough for some basic use cases, and we can do more sophisticated notifications later on when we need them.
2020-12-08WindowServer: Initial wallpaper must not be NULLBen Wiederhake
This used to crash 'pape -c' on a fresh image. Note that the special value is '', the empty string, and *not* NULL, i.e. an unset string. An empty string implies that the wallpaper is not an image, but rather a solid color.
2020-12-07WindowServer: Don't crash when pressing return after opening menuAndreas Kling
There isn't always a hovered item, so let's not assume things.
2020-12-06LookupServer: Put debug spam behind a macroAndreas Kling
2020-12-06WindowServer: Allow for more flexible tilingJulian Offenhäuser
The desktop can now be split up into halves (both vertical and horizontal) and quarters by dragging a window into the corresponding edge or corner. This makes tiling behave more like you would expect from similiar window managers.
2020-12-05AudioServer: Fix issue when adding a BufferQueue to MixerJulian Offenhäuser
Previously, the Mixer class would only check for an added BufferQueue if the list of active queues was empty. If more than one client connected to AudioServer, its queue would never be added to the list of active queues. This fix adds a flag that, when set, will cause the sound thread to wait for a new BufferQueue.
2020-12-02LibWeb: Layout viewport rect was lagging behind when resizingAndreas Kling
Layout was using an outdated viewport rect that we set *after* doing a layout due to resize. That meant that layout-in-response-to-resize was always lagging behind the current size of the view. The root of this problem was how Frame kept both a viewport rect (with both scroll offset and size) and a frame size. To fix this, only store the viewport scroll offset, and always use the frame size. This way they can't get out of sync and the problem goes away. :^) Fixes #4250.
2020-12-02Taskbar: Wait on all waitable children in SIGCHLD handlerTom
We need to call waitpid until no more waitable children are available. This is necessary because SIGCHLD signals may coalesce into one when multiple children terminate almost simultaneously. Also, switch to EventLoop's asynchronous signal handling mechanism, which allows more complex operations in the signal handler.
2020-12-02SystemServer: Wait on all waitable children in SIGCHLD handlerTom
We need to call waitpid until no more waitable children are available. This is necessary because SIGCHLD signals may coalesce into one when multiple children terminate almost simultaneously. This fixes random zombie processes sticking around after e.g. closing Browser. Also, switch to EventLoop's asynchronous signal handling mechanism, which allows more complex operations in the signal handler.
2020-11-29AudioServer: Mixer: limit max volume to 100Brendan Coles
2020-11-22LibWeb: Rename LayoutNode classes and move them into Layout namespaceAndreas Kling
Bring the names of various boxes closer to spec language. This should hopefully make things easier to understand and hack on. :^) Some notable changes: - LayoutNode -> Layout::Node - LayoutBox -> Layout::Box - LayoutBlock -> Layout::BlockBox - LayoutReplaced -> Layout::ReplacedBox - LayoutDocument -> Layout::InitialContainingBlockBox - LayoutText -> Layout::TextNode - LayoutInline -> Layout::InlineNode Note that this is not strictly a "box tree" as we also hang inline/text nodes in the same tree, and they don't generate boxes. (Instead, they contribute line box fragments to their containing block!)