summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2021-06-25WindowServer: Redraw screen when switching back from ttySahan Fernando
2021-06-25Userland: Add FB_FLUSH ioctl for fbdevSahan Fernando
2021-06-25WindowServer: Scale Mouse movementsAlexander
This fixes a bug where if the current screen was using scaling, the mouse would be twice as fast as normal.
2021-06-24Userland: Disambiguate dependent typesDaniel Bertalan
Clang produced an error on these pieces of code without the `typename` keyword.
2021-06-24Userland: Remove dummy IPC methodsGunnar Beutner
They're not used anywhere and are unnecessary boilerplate code. So let's remove them and update IPCCompiler to allow for empty endpoint declarations.
2021-06-22ChessEngine: don't store board in non-leaf nodes in MCTSPeter Elliott
Also make parameters static so they aren't in every node of the tree this saves a substantial amount of memory.
2021-06-22Taskbar: Check if executable in .af exist in filesystemPAUL007
This adds access X_OK check in discover_apps_and_categories() to see executable specified in .af files exist before registering them for start menu.
2021-06-22WindowServer: Send events once when global cursor tracking is enabledGunnar Beutner
Previously we'd send mouse events twice if the target window had global cursor tracking enabled.
2021-06-22LaunchServer: Fix regression in opening files with TextEditorbitwitch
My previous PR had a small error in rebasing and removed a line in open_file_url. This caused opening text files from the terminal to always open with an empty TextEditor. This commit fixes that problem!
2021-06-21LaunchServer: Make all file handlers configurable including directoriesbitwitch
This commit gets rid of hard coded file handlers in Launcher.cpp in favor of using values in the LaunchServer.ini config file. The previous commit adds checks for the existence of handler programs while registering handlers. This commit takes advantage of that and ensures that LaunchServer will not attempt to open a file with a nonexistent program and can properly report failure before spawning a new child process. Resolves #8120
2021-06-21LaunchServer: Check if handler programs exist when registering thembitwitch
This adds checks in load_handlers() and load_config() to see if the programs specified in the config files exist before registering them as handlers. Resolves #8121
2021-06-21WindowServer: Fix animated cursor regressionTom
2021-06-21WindowServer: Focus windows blocked by a modal windowMax Wipfli
If a window which has an active modal window is focused, the modal window starts blinking. In this case, the window (and modal) should still be focused. For this, the order of the checks in process_mouse_event_for_window has to be changed. This fixes #8183.
2021-06-20WindowServer: Reload icons on scale changesTom
Since MultiScaleBitmaps only loads icons for the scales in use, we need to unconditionally reload them so that we pick up the correct bitmaps for a scale that hasn't been previously used.
2021-06-20WindowServer: Update compositor reference to cursor on reloadTom
When we reload a cursor we should make sure the compositor has a valid reference to the updated cursor.
2021-06-20WindowServer: Enable screen capture to span multiple screensTom
This enables the shot utility to capture all screens or just one, and enables the Magnifier application to track the mouse cursor across multiple screens.
2021-06-20WindowServer: Load multiple scaled versions of Bitmaps and CursorsTom
This enables rendering of mixed-scale screen layouts with e.g. high resolution cursors and window button icons on high-dpi screens while using lower resolution bitmaps on regular screens.
2021-06-20WindowServer: Add API to set/get screen layoutsTom
This sets the stage so that DisplaySettings can configure the screen layout and set various screen resolutions in one go. It also allows for an easy "atomic" revert of the previous settings.
2021-06-20WindowServer: Validate that all screens can be reachedTom
If there are any screens that are detached from other screens it would not be possible to get to them using the mouse pointer. Also make sure that none of the screens are overlapping.
2021-06-20WindowServer: Fix artifacts after window resize in some casesTom
We were calculating the old window rectangle after changing window states that may affect these calculations, which sometimes resulted in artifacts left on the screen, particularily when tiling a window as this now also constrains rendering to one screen. Instead, just calculate the new rectangle and use the window's occlusion information to figure out what areas need to be invalidated.
2021-06-20WindowServer: Constrain rendering windows to one screen in some casesTom
When a window is maximized or tiled then we want to constrain rendering that window to the screen it's on. This prevents "bleeding" of the window frame and shadow onto the adjacent screen(s).
2021-06-20WindowServer: Add initial support for rendering on multiple screensTom
This allows WindowServer to use multiple framebuffer devices and compose the desktop with any arbitrary layout. Currently, it is assumed that it is configured contiguous and non-overlapping, but this should eventually be enforced. To make rendering efficient, each window now also tracks on which screens it needs to be rendered. This way we don't have to iterate all the windows for each screen but instead use the same rendering loop and then only render to the screen (or screens) that the window actually uses.
2021-06-20LaunchServer: Correctly open file URLs with line numbersAdam Hodgen
PR #5665 updated TextEditor to open files at a specific line/column location using the file:line:col argument, rather than the -l flag. This change updates LaunchServer to use that convention, though note it does only pass the line number and not a column number, as per all previous behaviour.
2021-06-19LibCoreDump: Include source locations of inlined functions in backtraceItamar
2021-06-18WindowServer: Move key event handling to its own functionAndreas Kling
Instead of making WindowManager::event() all about key events.
2021-06-18WindowServer: Make various functions take MouseEvent by const referenceAndreas Kling
Some paths of the mouse event processing code will upgrade the event from a regular MouseDown to a MouseDoubleClick. That's why we were passing `MouseEvent&` everywhere. For the paths that don't need to do this, passing `MouseEvent const&` reduces the cognitive burden a bit, so let's do that.
2021-06-18WindowServer: Don't include frame when determining hovered windowAndreas Kling
We only consider a window "hovered" if its *content area* is hovered.
2021-06-18WindowServer: Simplify handling of the window resize candidateAndreas Kling
Always clear the current resize candidate when starting new mouse event processing (instead of trying to be smart about it.)
2021-06-18WindowServer: Reorder and annotate the mouse event processing codeAndreas Kling
Hopefully people can now follow and understand how this works. :^)
2021-06-18WindowServer: Simplify how we determine the hovered windowAndreas Kling
Instead of plumbing a Window* through the entire mouse event processing logic, just do a hit test and say that the window under the cursor is the hovered window. It's funny how much easier this is now that we have a way to hit test the entire window stack with one call.
2021-06-18WindowServer: Simplify processing of window-specific mouse eventsAndreas Kling
Move the logic for processing a mouse event that hits a specific window into its own function. If the window is blocked by a modal child, we now get that out of the way first, so we don't have to think about it later.
2021-06-18WindowServer: Unify hit testing between fullscreen/regular windowsAndreas Kling
Even if a window is in fullscreen mode, we still want hit testing to walk the window stack. Otherwise child windows of the fullscreen window will not receive mouse events.
2021-06-18WindowServer: Move titlebar button mouse event handling to a functionAndreas Kling
The button widgets internally rendered by WindowServer are only used in titlebars, and require a bit of mouse event handling. Instead of mixing it with the window-oriented mouse event handling, get the button event stuff out of the way first.
2021-06-18WindowServer: Make deliver_mouse_event() perform coordinate translationAndreas Kling
Instead of expecting callers to provide a window-relative position, just take care of it inside deliver_mouse_event() instead.
2021-06-18WindowServer: Preserve all members in MouseEvent::translated()Andreas Kling
We were forgetting to preserve the m_drag and m_mime_data members of WindowServer::MouseEvent when making a translated copy. This didn't affect any reachable code paths before this change.
2021-06-18WindowServer: Don't let super key open system menu while tracking inputAndreas Kling
Previously it was possible to open the system menu while tracking mouse input after a mousedown event.
2021-06-18WindowServer: Always send mouse events to active input tracker firstAndreas Kling
If a window is currently actively tracking input events (because sent it a MouseDown and haven't sent it a MouseUp yet), we now simply send mouse events to that window right away before doing any other event processing. This makes it much easier to reason about mouse events.
2021-06-18WindowServer: Remove an unnecessary temporary variableAndreas Kling
2021-06-18WindowServer: Split up WindowFrame::handle_mouse_event()Andreas Kling
Break this function into a couple of smaller functions, one for each of these areas: - The titlebar - The titlebar icon - The menubar - The border
2021-06-18WindowServer: Add WindowStack::window_at() and use it a bunchAndreas Kling
This performs a hit test on the window stack to find the window under a given cursor position.
2021-06-18WindowServer: Make hit test results richerAndreas Kling
Instead of just answering hit/no-hit when hit testing windows, we now return a HitTestResult object which tells you which window was hit, where it was hit, and whether you hit the frame or the content.
2021-06-18WindowServer: Remove weird feature where Ctrl+Wheel changed opacityAndreas Kling
This feature had been there since early on and was not actually useful for anything. I just added it because it was fun. In retrospect, it's not a very good feature and I only ever activated it by accident.
2021-06-18WindowServer: Allow each WindowStack to have an active windowAndreas Kling
A window with an inner stack needs to keep track of which inner window is active.
2021-06-18WindowServer: Keep track of which WindowStack a Window is part ofAndreas Kling
Each Window now knows which WindowStack it's part of. We call this the Window::outer_stack(), in preparation for supporting inner stacks. :^)
2021-06-18WindowServer: Convert WindowManager to east-const styleAndreas Kling
2021-06-18WindowServer: Add WindowStack conceptAndreas Kling
This patch moves the window stack out of WindowManager and into its own WindowStack class. A WindowStack is an ordered list of windows with an optional highlight window. The highlight window mechanism is used during Super+Tab window switching to temporarily bring a window to the front. This is mostly mechanical, just moving the code to its own class.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-17SystemServer: Improve error message when execv() failsGunnar Beutner
Previously perror() would just tell us that the file specified for execv() doesn't exist.
2021-06-16WindowServer: Simplify WindowFrame shadow logic a little bitAndreas Kling
Remove the confusingly-named inflate_for_shadow() function and inline its logic into render_to_cache(). And remove the m_shadow_offset member variable since it was only needed locally in one place. Also improve some variable names to make it more understandable what is going on.
2021-06-16WindowServer: Fix unnecessary local variable shadowing in WindowFrameAndreas Kling