summaryrefslogtreecommitdiff
path: root/Services/WindowServer/WindowManager.h
AgeCommit message (Collapse)Author
2021-01-12Services: Move to Userland/Services/Andreas Kling
2021-01-12AK: Simplify constructors and conversions from nullptr_tLenny Maiorani
Problem: - Many constructors are defined as `{}` rather than using the ` = default` compiler-provided constructor. - Some types provide an implicit conversion operator from `nullptr_t` instead of requiring the caller to default construct. This violates the C++ Core Guidelines suggestion to declare single-argument constructors explicit (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit). Solution: - Change default constructors to use the compiler-provided default constructor. - Remove implicit conversion operators from `nullptr_t` and change usage to enforce type consistency without conversion.
2021-01-08WindowServer: is_blocked_by_modal_window() => blocking_modal_window()Andreas Kling
The name of this function was weird, since it returned the blocking modal window itself, and not just a bool answering the question.
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-19WindowServer: Put tooltip windows above notification windowsAndreas Kling
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-11-08LibGUI+WindowServer: Make DragOperation hold a MimeData instanceAnotherTest
...instead of maybe bitmap + a single mime type and its corresponding data. This allows drag&drop operations to hold multiple different kinds of data, and the views/applications to choose between those. For instance, Spreadsheet can keep the structure of the dragged cells, and still provide text-only data to be passed to different unrelated editors.
2020-11-02WindowServer+LibGfx: Add Gfx::StandardCursor::Hidden cursorBrendan Coles
2020-10-30WindowServer+LibGfx: Added Crosshair cursorUma Sankar Yedida
2020-08-19WindowServer: Find parent taskbar rect for minimize animationTom
If a modal window is being minimized, it may not have its own taskbar rectangle. In that case, try finding a parent in the modal window stack that does have one, and use that for the animation.
2020-08-18WindowServer: Fix flickeringTom
Rather than blitting and rendering each window every time, only render what actually changed. And while doing so, only render the portions that are visible on the screen. This avoids flickering because flipping framebuffers isn't always perfectly in sync with the code, so it's possible that the flip happens slightly delayed and we can briefly see the next iteration having partially completed. Also, avoid touching the mouse cursor unless it is in an area that needs updating. This reduces flickering unless it is over an area that is updated often. And because we no longer render the entire screen, we'll save the contents below the cursor so that we can hide it before touching that area. Fixes #2981
2020-08-01LibGUI+WindowServer: Provide default placement to windowsPeter Elliott
This prevents windows from being opened directly on top of eachother, and provides default behavior for when window position is not specified. The new behavior is as follows: - Windows that have been created without a set position are assigned one by WindowServer. - The assigned position is either offset from the last window that is still in an assigned position, or a default position if no such window is available.
2020-07-16WindowServer: Fix traversing modal stackTom
When walking the modal window stack upwards, we need to check if the top modal window is still a descendant of the window that the parent is blocked by. Fixes not all windows being brought to the front when trying to active a parent in the middle of the modal window stack.
2020-07-16WindowServer: Expose window parent information and more modal improvementsTom
* The parent information is necessary by the Taskbar to be able to determine a modal window's parent * Minimize and maximize modal window stacks together
2020-07-16WindowServer: Fixes for modal windowsTom
This fixes a few problems with modal windows: * If any child window, or any child window further down the tree is considered modal, then all windows in that chain are modal. * When trying to activate a window blocked by a modal child bring the entire stack of modal windows to the front and activate the modal window. * A window is modal if it has a parent and it's flagged as modal, regardless of whether the ClientConnection has created modal windows. This technically supports diverging modal window trees as well, where two modal windows share the same parent, allowing both to be activated (including for input) but not the parent. And it should also support modal window stacks of arbitrary depth.
2020-07-15WindowServer: Make Menus the input window when showing themTom
This solves a problem where windows don't receive a WindowInputLeft event when popup menus are opened. This prevented ComboBox being closed when right clicking the application on the task bar.
2020-07-15WindowServer: Add accessory windowsTom
Accessory windows are windows that, when activated, will activate their parent and bring all other accessory windows of that parent to the front of the window stack. Accessory windows can only be active input windows. The accessory window's parent is always the active window regardless of whether it is also the active input window. In order to route input correctly, input is now sent to the active input window, which can be any accessory window or their parent, or any regular window.
2020-07-11WindowServer: Add support for default MenuItemTom
This allows marking a MenuItem as a default action, e.g. in a context menu for an action that reflects what e.g. a double click would perform. Also enhance the window menu to mark the close action as the default, and when double clicked perform that action. Fixes #1289
2020-07-07WindowServer+LibGUI: Add "wait" cursorLinus Groh
2020-07-07WindowServer+LibGUI: Add "help" cursorLinus Groh
2020-07-07WindowServer+LibGUI: Add "resize row/column" cursorsLinus Groh
2020-06-10LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSizeAndreas Kling
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
2020-06-01WindowServer: Remove keyboard shortcut for toggling the system menuAndreas Kling
100% of the time I activated this shortcut, I did not want to activate this shortcut.
2020-05-30WindowServer+LibGUI: Add per-window progressAndreas Kling
Each window now has an associated progress integer that can be updated via the SetWindowProgress IPC call. This can be used by clients to indicate the progress of ongoing tasks. Any number in the range 0 through 100 indicate a progress percentage. Any other number means "no progress"
2020-05-20WindowServer: Remove WindowManager::invalidate(Window) API'sAndreas Kling
Instead, we now tell Windows to invalidate themselves. Window will then pass on the requests to Compositor. My basic idea here is that WindowManager should do window management, dealing with incoming events, moving, resizing, etc. Compositor should deal with painting the window stack in the right order with the least amount of effort. :^)
2020-05-20WindowServer: Move occlusion things from WindowManager to CompositorAndreas Kling
2020-05-18WindowServer: Rename WindowManager wm_config() to config()Shannon Booth
It looked a little silly with all of the callers saying wm.wm
2020-05-18WindowServer: Make some WindowManager member functions constShannon Booth
2020-05-09WindowServer: Cancel any ongoing input tracking when a menu pops upAndreas Kling
When the user opens a context menu by right-clicking on something, we now immediately stop sending mouse events to whoever was doing active input window tracking before. There are probably more situations where we should do this, and maybe there's also a more generic way to express it, but this works for now.
2020-05-08Services: Renamed from ServersAndreas Kling
It didn't feel right to have a "DHCPClient" in a "Servers" directory. Rename this to Services to better reflect the type of programs we'll be putting in there.