summaryrefslogtreecommitdiff
path: root/Services
AgeCommit message (Collapse)Author
2020-08-30WindowServer: Unbreak building with extra debug macrosBen Wiederhake
2020-08-28ChessEngine: Move from Applications to ServicesAndreas Kling
This is not a stand-alone application. :^)
2020-08-27WindowServer: Fix minor flicker with transparent windowsTom
Do not fill the backing store mismatch area with the solid window color if the window is transparent. This caused some minor flicker when such a window is e.g. snapped to the left/right or maximized.
2020-08-26WindowServer+LibGfx: Move title bar button layout to WindowThemethankyouverycool
2020-08-25AK: Add Endian.h header to replace NetworkOrdered.h.asynts
2020-08-24DHCPClient: Prefer strlcpy over strncpy, fixes off-by-oneBen Wiederhake
A malicious caller of set_params could have caused the ifr_name field to lack NUL-termination. I don't think this was an actual problem, though, as the Kernel always forces NUL-termination by overwriting ifr_name's last byte with NUL. However, it feels better to do it properly. No behaviour change (probably).
2020-08-24LibCore: Prefer strlcpy over strncpy, fix overflowBen Wiederhake
A malicious caller can create a SocketAddress for a local unix socket with an over-long name that does not fit into struct sock_addr_un. - Socket::connet: This caused the 'sun_path' field to overflow, probably overwriting the return pointer of the call frame, and thus crashing the process (in the best case). - SocketAddress::to_sockaddr_un: This triggered a RELEASE_ASSERT, and thus crashing the process. Both have been fixed to return a nice error code instead of crashing.
2020-08-23LibGfx+WindowServer: Simplify notification window frame themingAndreas Kling
Don't require theme clients to provide the frame rect, the theme can compute that internally based on the window rect.
2020-08-23LibGUI+WindowServer: Add resize_aspect_ratio()Peter Elliott
When a resize_aspect_ratio is specified, and window will only be resized to a multiple of that ratio. When resize_aspect_ratio is set, windows cannot be tiled.
2020-08-22LibGUI+WindowServer: Remove ResizeEvent::old_size()Andreas Kling
Turns out nobody was using this information anyway, so let's not go through all the trouble of plumbing it from WindowServer to LibGUI. Fixes #3247.
2020-08-21LibGfx+WindowServer: Simplify WindowTheme::paint_normal_frame() APIAndreas Kling
Don't require passing in the outer frame rect since the theme can compute that itself, based on the window rect.
2020-08-21WindowServer: Fix MenuApplets paintingTom
We need to clip painting to the actual size to prevent corrupting the area outside of the applet as the backing store is not guaranteed to be perfectly in sync. Fixes #3107
2020-08-20SystemServer: Minor #include cleanup in Service.cpp (#3227)Muhammad Zahalqa
2020-08-19WindowServer: Process dnd mouse events firstTom
Fixes duplicate GUI::DragOperation instances being created. Fixes #3151
2020-08-19Taskbar: Update and clear taskbar button rectanglesTom
We need to update all button rectangles when the layout changed. We also need to clear the taskbar button rectangle when we remove a modal window button, so that WindowServer uses the parent's taskbar button rectangle for the minimize animation.
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: Use same modal minimize/maximize logic with shortcutsTom
When minimizing/maximizing windows using the keyboard shortcuts we should use the same logic dealing with modal windows as the window frame buttons.
2020-08-18WindowServer+LibVT: Convert some dbgprintf() to dbg()Sergey Bugaev
These kept annoying me, because these were the only two lines in the default boot log that went unattributed.
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-17WindowServer: Close the framebuffer fd in ~Screen()Andreas Kling
2020-08-17LibWeb: Rename WebContentView => OutOfProcessWebViewAndreas Kling
2020-08-17LibWeb: Rename PageView => InProcessWebViewAndreas Kling
2020-08-15LibGUI: Add and use Window::center_on_screen()Linus Groh
Various applications were using the same slightly verbose code to center themselves on the screen/desktop: Gfx::IntRect window_rect { 0, 0, width, height }; window_rect.center_within(GUI::Desktop::the().rect()); window->set_rect(window_rect); Which now becomes: window->resize(width, height); window->center_on_screen();
2020-08-15SystemServer: Adjust assertion+comment for new dup2() behaviorAndreas Kling
dup2(fd, fd) will no longer clear CLOEXEC on the descriptor.
2020-08-15WindowServer: Minimize the modal stack when minimizing from frameTom
Rather than only minimizing the modal window, minimize the entire modal window stack just like when minimizing it from the task bar.
2020-08-14WindowServer: Take MenuApplet windows into account for hovered_windowLinus Groh
This finally makes tooltips on menu applets the same as everywhere else! Here's what went wrong: WindowManager::process_mouse_event() receives a Window*&, determines the hovered window and sets it accordingly. However there's a branch that tests for menubar_rect().contains(event.position()) and returns early - which resulted in hovered_window never being set to any MenuApplet window, even hovered ones. The hovered_window result is being used in WindowManager::event() and passed to WindowManager::set_hovered_window(), which is responsible for creating WindowLeft and WindowEntered events when the hovered window changes, as a result of the mentioned chain of events this also never happens for MenuApplet windows. The WindowLeft event would the cause Window::handle_left_event() in LibGUI to be called, which unsets the window's hovered widget, which is necessary for the widget to receive a subsequent Enter event - again, all of this never happened. Now it's working as expected though, so we can start using tooltips on menu applets :^)
2020-08-13WindowServer: Handle global cursor tracking before ongoing drag/move/resizeLinus Groh
In the case of an ongoing window drag/move/resize action WindowManager::process_mouse_event() would return early, even before delivering mouse events to windows with global cursor tracking enabled. They would only continue to receive new mouse events once those actions were completed. Fixes #3116.
2020-08-12Services: Mark compilation-unit-only functions as staticBen Wiederhake
This enables a nice warning in case a function becomes dead code.
2020-08-10WindowServer: Limit maximizing windows to top window in modal stackTom
When maximizing a window that is blocked by a modal window, only maximize the top window in the stack. However, if the stack is minimized, restore all of them in addition. Fixes #3074
2020-08-10WindowServer: Use to_theme_window_type() a bit moreAndreas Kling
2020-08-10WindowServer+LibGfx: Move window frame rect calculation to WindowThemeAndreas Kling
2020-08-09WindowServer+LibGfx: Move notification window frame painting to LibGfxAndreas Kling
ClassicWindowTheme can now also paint notification window frames.
2020-08-09WindowServer+LibGfx: Move normal window frame painting to a WindowThemeAndreas Kling
This patch introduces the ClassicWindowTheme, which is our default theme implemented as a Gfx::WindowTheme subclass. In this initial cut, we move normal window frame painting and title bar metrics helpers out of WindowServer and into LibGfx. This will eventually allow us much greater flexibility with theming windows, and also makes it easier to build applications that want to render a window with a specific style for some reason. :^)
2020-08-07AudioServer: Lock the process veil after startupBrian Gianforcaro
We can't do any file syscalls anyway because of the reduction of pledges, so we might as well lock the veil anyway.
2020-08-05Unicode: Try s/codepoint/code_point/g againNico Weber
This time, without trailing 's'. Ran: git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05Revert "Unicode: s/codepoint/code_point/g"Nico Weber
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e. It replaced "codepoint" with "code_points", not "code_point".
2020-08-04LaunchServer: Disown child processes after spawningAndreas Kling
2020-08-04SystemMenu: Disown child processes after spawningAndreas Kling
2020-08-04Taskbar: Disown quick-launched programsAndreas Kling
2020-08-04SystemMenu: Disown spawned programsAndreas Kling
2020-08-03LibWeb: Send key events to the WebContent processAndreas Kling
This makes contenteditable work in multi-process mode. :^)
2020-08-03Unicode: s/codepoint/code_point/gAndreas Kling
Unicode calls them "code points" so let's follow their style.
2020-08-03WindowServer: Bring window stack to front when clicking on frameTom
When clicking on a window's frame that is blocked by a modal window, we want to bring the entire window stack to the front regardless of where the user clicked in the frame (not just the icon).
2020-08-02ProtocolServer+LibTLS: Pipe certificate requests from LibTLS to clientsAnotherTest
This makes gemini.circumlunar.space (and some more gemini pages) work again :^)
2020-08-02WindowServer: Redraw MenuApplets on add/deleteBen Wiederhake
2020-08-01Themes: Fix default theme window stripes and shadow after #2811Nico Weber
Change #2811 made window title stripes and window title shadow themable, but it used the same stripe and shadow color for all window modes. This is fine for the new 'basalt' theme which uses the same color in all four window modes, but it changed the default theme so that background windows had brown stripes and a brown shadow. Instead, make the title stripe and title shadow themable per window mode, and change the default theme to restore the colors it had before change #2811: The title stripe color is the same as Border1 for all window modes, and the title shadow is the same as the title stripe darkened by 0.6.
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-08-01Services: Convert WindowFrame button bitmaps to themable PNGsthankyouverycool
Custom buttons can now be set using TitleButtonIcons under the Paths group in themes. WindowFrame recognizes window-close.png, window-minimize.png, window-maximize.png and window-restore.png filenames.
2020-07-28LibWeb: Move the Page/Frame/EventHandler classes into Page/Andreas Kling
2020-07-28SystemMenu: Add 'Themes' iconBen Wiederhake