summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/ClientConnection.cpp
AgeCommit message (Collapse)Author
2021-07-08WindowServer: Add a new IPC to set the cursor positionAndrea Martinelli
2021-07-08Everywhere: Remove unused local variables and lambda capturesDaniel Bertalan
2021-07-07WindowServer+wsctl: Add a simple utility for toggling "flash flush"Andreas Kling
You can now put the WindowServer into "flash flush" mode by doing: $ wsctl -f 1 To disable it, somewhat obviously: $ wsctl -f 0
2021-07-07LibGfx+LibGUI+WindowServer: Use move() on Core::AnonymousBuffer moreAndreas Kling
2021-07-04WindowServer+LibGUI: Add a way to force a window to have a drop shadowAndreas Kling
2021-07-03WindowServer: Add API to change virtual desktop settingsTom
This also adds the ability to query how many virtual desktops are set up, and for the Taskbar to be notified when the active virtual desktop has changed.
2021-06-27WindowServer+LibGUI: Allow specifying a "launch origin" for new windowsAndreas Kling
The launch_origin_rect parameter to create_window() specifies where on screen the window was launched from. It's optional, but if you provide it, the new window will have a short wireframe animation from the origin to the initial window frame rect. GUI::Window looks for the "__libgui_launch_origin_rect" environment variable. Put your launch origin rect in there with the format "<x>,<y>,<width>,<height>" and the first GUI::Window shown by the app will use that as the launch origin rect. Also it looks pretty neat, although I'm sure we can improve it. :^)
2021-06-25WindowServer: Change rendering drag&drop to use the Overlay classTom
This enables flicker-free rendering.
2021-06-25WindowServer: Add an Overlay class for flicker-free overlay renderingTom
An Overlay is similar to a transparent window, but has less overhead and does not get rendered within the window stack. Basically, the area that an Overlay occupies forces transparency rendering for any window underneath, which allows us to render them flicker-free. This also adds a new API that allows displaying the screen numbers, e.g. while the user configures the screen layout in DisplaySettings Because other things like drag&drop or the window-size label are not yet converted to use this new mechanism, they will be drawn over the screen-number currently.
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: 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-12WindowServer+LibGUI: Make window creation asynchronous :^)Andreas Kling
Let clients manage their own window ID's. If you try to create a new window with an existing ID, WindowServer will simply disconnect you for misbehaving. This removes the need for window creation to be synchronous, which means that most GUI applications can now batch their entire GUI initialization sequence without having to block waiting for responses.
2021-06-09LibGUI/WindowServer: Add set_maximized IPC callMarcus Nilsson
Add an IPC call to enable the client to manually maximize it's own window.
2021-06-07WindowServer+Magnifier: Make Magnifier buttery smooth :^)Andreas Kling
This patch moves the magnifier rect computation over to the server side to ensure that the mouse cursor position and the screen image never get out of sync.
2021-06-06WindowServer: Add a GetDesktopDisplayScale IPC requestEugene Barnett
Tells you which scale factor is configured in window manager.
2021-06-03WindowServer: Add sanity checks to `create_window` IPCMatthew Jones
2021-06-02LibGUI+LibGfx+WindowServer: Sanity check window size dimensionsMatthew Jones
Previous to this commit, if a `Window` wanted to set its width or height greater than `INT16_MAX` (32768), both the application owning the Window and the WindowServer would crash. The root of this issue is that `size_would_overflow` check in `Bitmap` has checks for `INT16_MAX`, and `Window.cpp:786` that is called by `Gfx::Bitmap::create_with_anonymous_buffer` would get null back, then causing a chain of events resulting in crashes. Crashes can still occur but with `VERIFY` and `did_misbehave` the causes of the crash can be more readily identified.
2021-05-24LibGfx: Use anonymous buffer instead of raw anon_fd for Gfx::BitmapJean-Baptiste Boric
Instead of using a low-level, proprietary API inside LibGfx, let's use Core::AnonymousBuffer which already abstracts anon_fd and offers a higher-level API too.
2021-05-21WindowServer: Store system font queries in WindowServer.ini :^)Andreas Kling
Changes to the system font settings are now persisted in /etc. Note that you still need to restart the system for changes to fully apply in all programs.
2021-05-21WindowServer+LibGUI: Add an IPC API to change the current system fontsAndreas Kling
This patch adds a set_system_fonts() IPC API that takes the two main font queries as parameters. We'll probably expand this with additional queries when we figure out what they should be. Note that changing the system fonts on a live system mostly takes effect in newly launched programs. This is because GUI::Widget will currently cache a pointer to the Gfx::FontDatabase::default_font() when first constructed. This is something we'll have to fix somehow. Also note that the settings are not yet persisted.
2021-05-21LibGfx+WindowServer: Have WindowServer broadcast system font settingsAndreas Kling
Instead of everybody getting their system fonts from Gfx::FontDatabase (where it's all hardcoded), they now get it from WindowServer. These are then plumbed into the usual Gfx::FontDatabase places so that the old default_font() and default_fixed_width_font() APIs keep working.
2021-05-20WindowServer+LibGUI: Make client/server greeting fasterAndreas Kling
Instead of doing a full IPC round-trip for the client and server to greet each other upon connecting, the server now automatically sends a "fast_greet" message when a client connects. The client simply waits for that message to arrive before proceeding. (Waiting is necessary since LibGUI relies on the palette information included in the greeting.)
2021-05-17WindowServer+LibGUI: Make menubar allocation asynchronousAndreas Kling
Same as with menu allocation, move menubar ID management to the client side, removing more IPC stalls during application startup.
2021-05-17WindowServer+LibGUI: Make menu allocation asynchronousAndreas Kling
This was only synchronous since WindowServer managed the ID allocation. Doing this on the client side instead allows us to make create_menu() an asynchronous IPC call, removing a bunch of IPC stalls during application startup.
2021-05-12WindowServer: Re-render window frame when setting unresponsive statusLinus Groh
Otherwise "(not responding)" would not appear in the window title until the window is moved/resized.
2021-05-11WindowServer: Add Optional<Gfx::IntRect> argument to get_screen_bitmap()Valtteri Koskivuori
This way, we can optionally specify a region of the display to capture. Defaults to entire screen if no rectangle is given.
2021-05-06WindowServer: Don't let clients start resize of non-resizable windowsAndreas Kling
This came up in #6886. If resizing has been disabled for a window, we shouldn't let clients bypass this via start_window_resize().
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-03Userland: Change IPC funcs to use plain arguments instead of a structGunnar Beutner
Instead of having a single overloaded handle method each method gets its own unique method name now.
2021-05-02Userland: Make IPC handlers return void if they don't have any outputsGunnar Beutner
2021-05-02Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlersGunnar Beutner
2021-05-01WindowServer: Add Window "modified" stateAndreas Kling
This will be used to track which windows contain some kind of unsaved data that the user may want some help remembering to save. :^)
2021-04-29WindowServer: Move configuration file to /etc/WindowServer.iniAndreas Kling
This was in the /etc/WindowServer/ directory which had nothing else in it, so let's just get rid of the directory and move this up one step.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-18Everywhere: Rename title_bar => titlebarAndreas Kling
2021-04-17LibGUI+WindowServer: Separate window manager IPC from regular IPCsin-ack
With this patch the window manager related functionality is split out onto a new endpoint pair named WindowManagerServer/Client. This allows window manager functionality to be potentially privilege separated in the future. To this end, a new client named WMConnectionClient is used to maintain a window manager connection. When a process connects to the endpoint and greets the WindowServer as a window manager (via Window::make_window_manager(int)), they're subscribed to the events they requested via the WM event mask. This patch also removes the hardcoding of the Taskbar WindowType to receive WM events automatically. However, being a window manager still requires having an active window, at the moment.
2021-04-16Everywhere: Add `-Wdouble-promotion` warningNicholas-Baron
This warning informs of float-to-double conversions. The best solution seems to be to do math *either* in 32-bit *or* in 64-bit, and only to cross over when absolutely necessary.
2021-04-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-04-04WindowServer+LibGUI: Rename WindowType::MenuApplet => AppletAndreas Kling
2021-04-02WindowServer+MouseSettings: Add ability to configure double-click speed (#5876)Daniël van de Burgt
This adds a double-click speed slider control to the Mouse Settings panel, and value labels for both the movement speed and double-click speed sliders. To allow for updating and persisting the configured double-click speed through the WindowServer, two IPC calls - `SetDoubleClickSpeed` and `GetDoubleClickSpeed` - have been added.
2021-03-30WindowServer+LibGUI: Plumb mouse/enter/leave events to applet windowsAndreas Kling
Since applet windows live in the applet area window, the AppletManager has to keep track of which applet is hovered and send the appropriate enter/leave events to the applet windows. This makes applet tooltips work again. :^)
2021-03-30WindowServer+Taskbar: Show applets in taskbar :^)Andreas Kling
WindowServer now collects applet windows into an "applet area" which is really just a window that a WM (window management) client can position via IPC. This is rather hackish, and I think we should come up with a better architecture eventually, but this brings back the missing applets since the global menu where they used to live is gone.
2021-03-26WindowServer: Add an IPC call for taking a screenshotAndreas Kling
This patch adds Messages::WindowServer::GetScreenBitmap. It returns the currently displayed on-screen bitmap as-is, as a Gfx::ShareableBitmap.
2021-03-25WindowServer: Remove "system menu" concept from WindowServerAndreas Kling
2021-03-25WindowServer: Remove SetApplicationMenubar IPC messageAndreas Kling
2021-03-25WindowServer: Remove the global app menuAndreas Kling
The SetApplicationMenu IPC message is still there, since we also need to clean up all of the client code before we can remove that.
2021-03-25WindowServer+LibGfx: Show menus in windows! :^)Andreas Kling
This patch begins the transition away from the global menu towards per-window menus instead. The global menu looks neat, but has always felt clunky, and there are a number of usability problems with it, especially in programs with multiple windows. You can now call GUI::Window::set_menubar() to add a menubar to your window. It will be specific to that one window only.
2021-03-16LibGfx: Rename 32-bit BitmapFormats to BGRA8888 and BGRx888xAndreas Kling
The previous names (RGBA32 and RGB32) were misleading since that's not the actual byte order in memory. The new names reflect exactly how the color values get laid out in bitmap data.