summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2022-08-25WindowServer: Fix typo 'reminder' -> 'remainder' in WindowManagerthankyouverycool
2022-08-25WindowServer: Get taskbar height from TaskbarWindow directlythankyouverycool
Fixes incorrect hardcoded heights and a failure to get taskbar height when tiling on new workspaces.
2022-08-25LibGUI+WindowServer: Initialize minimum window size to zerothankyouverycool
And remove unnecessary workarounds to the old limit of {50, 50} and the cautious but arbitrary limit of {1, 1} for other WindowTypes. Null rects are already the default when calculating minimum window size and are the least restrictive but valid value. Also returns early during minimum size calculations for frameless windows, and verifies against negative minimum sizes and failure to disable widget min size before setting a minimum window size. Layout automatically overrides this setting each relayout otherwise.
2022-08-24WindowServer+DisplaySettings: Capitalize display mode dropdownJames Bellamy
Every other dropdown in settings is capitalized apart from this one. This commit fixes that.
2022-08-23Userland: Rely on a single authoritative source for the default `PATH`Tim Schumacher
2022-08-23LibJS: Remove {Bytecode::,}Interpreter::global_object()Linus Groh
The basic idea is that a global object cannot just come out of nowhere, it must be associated to a realm - so get it from there, if needed. This is to enforce the changes from all the previous commits by not handing out global objects unless you actually have an initialized realm (either stored somewhere, or the VM's current realm).
2022-08-23LibJS+LibWeb: Reduce use of GlobalObject as an intermediaryLinus Groh
- Prefer VM::current_realm() over GlobalObject::associated_realm() - Prefer VM::heap() over GlobalObject::heap() - Prefer Cell::vm() over Cell::global_object() - Prefer Wrapper::vm() over Wrapper::global_object() - Inline Realm::global_object() calls used to access intrinsics as they will later perform a direct lookup without going through the global object
2022-08-23LibJS: Pass Realm to define_native_{accessor,function}()Linus Groh
This is needed so that the allocated NativeFunction receives the correct realm, usually forwarded from the Object's initialize() function, rather than using the current realm.
2022-08-23LibJS: Pass Realm to GlobalObject::initialize_global_object()Linus Groh
Global object initialization is tightly coupled to realm creation, so simply pass it to the function instead of relying on the non-standard 'associated realm' concept, which I'd like to remove later. This works essentially the same way as regular Object::initialize() now. Additionally this allows us to forward the realm to GlobalObject's add_constructor() / initialize_constructor() helpers, so they set the correct realm on the allocated constructor function object.
2022-08-23LibWeb: Replace GlobalObject with Realm in wrapper functionsLinus Groh
Similar to create() in LibJS, wrap() et al. are on a low enough level to warrant passing a Realm directly instead of relying on the current realm from the VM, as a wrapper may need to be allocated while no JS is being executed.
2022-08-23LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]Linus Groh
This is where the fun begins. :^)
2022-08-23LibJS: Remove GlobalObject from VM::this_value()Linus Groh
This is a continuation of the previous six commits. The global object is only needed to return it if the execution context stack is empty, but that doesn't seem like a useful thing to allow in the first place - if you're not currently executing JS, and the execution context stack is empty, there is no this value to retrieve.
2022-08-23LibJS: Remove GlobalObject from VM::throw_completion()Linus Groh
This is a continuation of the previous five commits. A first big step into the direction of no longer having to pass a realm (or currently, a global object) trough layers upon layers of AOs! Unlike the create() APIs we can safely assume that this is only ever called when a running execution context and therefore current realm exists. If not, you can always manually allocate the Error and put it in a Completion :^) In the spec, throw exceptions implicitly use the current realm's intrinsics as well: https://tc39.es/ecma262/#sec-throw-an-exception
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in Heap::allocate<T>()Linus Groh
This is a continuation of the previous three commits. Now that create() receives the allocating realm, we can simply forward that to allocate(), which accounts for the majority of these changes. Additionally, we can get rid of the realm_from_global_object() in one place, with one more remaining in VM::throw_completion().
2022-08-23NetworkServer: Use Core::Stream instead of Core::Filehuttongrabiel
As per the FIXME.
2022-08-22ChessEngine: Don't throw away useful branches from last treeLucas CHOLLET
Computation from last turn might have produced some nodes that are still accurate. Keeping them should make the engine a bit smarter.
2022-08-22ChessEngine: Use reduced Board objects in MCTSTreeLucas CHOLLET
Monte-Carlo methods are known to intensively create nodes and in our case each leaf of the tree stores a board. However, for this use case, we don't need a full board object that also contains game information. This patch adds a `clone_cleared()` method that return a clone without game information and uses it when constructing the tree. It allows the ChessEngine much more possibility before getting out of memory.
2022-08-22ChessEngine: Limit MCTSTree expansionLucas CHOLLET
This method temperate the habit of Monte-Carlo based algorithms to repeatedly create new nodes. It was first implemented in `Efficient Selectivity and Backup Operators in Monte-Carlo Tree Search` by Rémi Coulom.
2022-08-21WindowServer: Redraw menu items after client updates them somehowAndreas Kling
This fixes an issue where the undo/redo actions in TextEditor only updated once you hovered over them.
2022-08-16LibGUI+WindowServer+DisplaySettings: Add Tooltips to SystemEffectsthankyouverycool
Tooltips can now be toggled on and off system-wide.
2022-08-16WindowServer: Remove unused header in SystemEffectsthankyouverycool
2022-08-16WindowServer: Walk the open menu stack in reverse on MouseMove eventsthankyouverycool
Fixes lower level menus stealing focus from higher submenus.
2022-08-16WindowServer: Do not pop-up submenus directly atop their ancestorsthankyouverycool
Previously submenus would pop-up on their immediate open ancestors in cases of limited screen real estate. If the submenu was sufficiently large, this could make it difficult to navigate back down the menu stack. Now submenus display on either side of their ancestors, making it easy to zig-zag up and down menu stacks. This is similar to how menus operate in many other DEs.
2022-08-16WindowServer: Add MenuManager helper to find closest open ancestorthankyouverycool
2022-08-16WindowServer: Force cursor invalidation when composing immediatelythankyouverycool
And invalidate the cursor before creating a new drag-and-drop overlay. Fixes dnd overlay bitmaps failing to draw at the correct location immedately after changing cursors.
2022-08-16WindowServer: Don't start a drag and drop unless holding Primary mousethankyouverycool
Adds a member to record the last processed mouse buttons. If they do not include MouseButton::Primary, return early before creating a new drag and drop client. This fixes race conditions in which MouseUp events canceling or completing a drop could be swallowed by Overlay creation or postponed by an executing DragOperation, leaving the operation in limbo.
2022-08-16WindowServer: Use correct config group for workspace settingsthankyouverycool
WindowServer.ini already contained the correct pluralized group by default, but was left unused by a typo.
2022-08-16WindowServer+WorkspacePicker: Adjust active and inactive colorsthankyouverycool
Now uses the Selection ColorRole for the active desktop and a slightly darkened Window for inactive ones. Several themes use the same color for thread highlighting and inactive windows which was causing frames to draw without the correct perception of depth.
2022-08-16WindowServer: Always use the automatic cursor tracking window's cursorAndreas Kling
Whenever we're in the "automatic cursor tracking" state, we should only display the tracking window's cursor, as the state is globally modal.
2022-08-16WindowServer: Move "automatic cursor tracking window" to WindowManagerAndreas Kling
It didn't make sense for this to be a per-WindowStack concept, since automatic cursor tracking is globally modal.
2022-08-16WindowServer: Rename "active input tracking window"Andreas Kling
...to "automatic cursor tracking window". This matches what we call its sibling concept in LibGUI ("automatic cursor tracking widget").
2022-08-15LoginServer+LibCore: Only create user temp directory from LoginServerAndreas Kling
Other programs use Core::Account::login(), notably su(1), which stopped working due to a missing "cpath" pledge promise. This patch moves the /tmp/user/ creation logic to a separate function that LoginServer can call.
2022-08-14Base: Launch InspectorServer at session start-upLucas CHOLLET
2022-08-14Base: Launch ImageDecoder at session start-upLucas CHOLLET
2022-08-14Base: Launch WebSocket at session start-upLucas CHOLLET
2022-08-14Base: Launch Request at session start-upLucas CHOLLET
2022-08-14LibCore+LibIPC: Recognise %uid in pathLucas CHOLLET
This patch allows to insert "%uid" in `IPC_CLIENT_CONNECTION` declaration and in SystemServer's ini files. This pattern is replaced then replaced by the UID of the owner of the service. It opens a path for seamlessly managed, per-user portal.
2022-08-14LibCore+LaunchServer: Move portal directory to `/tmp/user/%uid`Lucas CHOLLET
The `/tmp/user` directory is owned by root, this solution prevents malicious users to interfere with other users' portals. This commit also moves `launch`'s portal in the user directory.
2022-08-14SystemServer: Create accounts with `Account::Read::PasswdOnly`Lucas CHOLLET
This prevents non-root instances of SystemServer to try to open `/etc/shadow`.
2022-08-14SystemServer: Change user only when neededLucas CHOLLET
2022-08-14SystemServer: Unlink before binding a new socketLucas CHOLLET
Prevent "Address already in use" issues when restarting a service.
2022-08-09WindowServer: Let WindowManager set serverside effectsthankyouverycool
Menu and Window animations can now be disabled and the geometry overlay made conditional. Shadow options are dependent on the current theme actually supplying bitmaps, but they provide a fast way to toggle those that do without having to edit theme files.
2022-08-09LibGUI+WindowServer: Create IPC calls for passing SystemEffectsthankyouverycool
SystemEffects are sent to the WindowManager through set_system_effects() and broadcast to Desktop clients with update_system_effects(). WindowManager is reponsible for saving, loading and rebroadcasting effects from WindowServer.ini on config changes.
2022-08-09LibGUI+WindowServer: Add a SystemEffects wrapper and helpersthankyouverycool
SystemEffects provides a tidy way to work with system-wide visual options passed through IPC.
2022-08-05LibJS: Let Shape store a Realm instead of a GlobalObjectAndreas Kling
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
2022-08-02LibHTTP+WebServer: Add querystring support0xbigshaq
Split the path from querystring when determining the requested resource.
2022-08-02WindowServer+LibGUI: Remove awkward roundtrip for set wallpaper responsenetworkException
Previously we would wait for a separate message confirming that a wallpaper got set instead of just calling a synchronous api. I'm guessing that this was a limitation of the IPC system when WindowServer got ported to using it. This patch removes the SetWallpaperFinished message and updates the set_wallpaper api to synchronously return a success boolean.
2022-08-01Userland+Base: Make the window titlebar font configurable separatelyAndreas Kling
Instead of defaulting to "bold variant of the system default font", let's allow the user to set any font they want as the titlebar font.
2022-07-27LaunchServer: Let open_file_url use app defaultsdemostanis
Before, programs using open_file_url (such as Terminal) would fail to open any file if its extension (or mime type) wasn't specified in LaunchServer.ini. This patch now permits it.
2022-07-27LaunchServer+LibDesktop: Open from mime typedemostanis
Before, LaunchServer would only open files based on their extension. This wouldn't work if the file had the wrong one.