summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2021-02-21WindowServer: Allow changing frameless state after a window is createdTom
2021-02-20WindowServer: Improve small tooltips/windows shadows a bitTom
This fixes some artifacts with very small tooltip windows.
2021-02-20LibWeb: Implement Window.prompt()Linus Groh
2021-02-19WindowServer: Restore cursor when marking window as responsiveSahan Fernando
2021-02-18WindowServer: Ignore other button presses while moving/resizing windowsTom
Fixes #5334
2021-02-18WindowServer: Apply the backing bitmap's scale when alpha hit-testingTom
Fixes #5390
2021-02-17WindowServer: Unbreak "pick new active window" algorithmAndreas Kling
We lost the ability to pick a suitable new active window when I added the support for tool windows.
2021-02-17DHCPClient: Set ServerIdentifier and RequestedAddress in DHCP REQUESTsAnotherTest
Some dhcp servers require these to be there - otherwise, the ack gets dropped somewhere.
2021-02-17DHCPClient: Set the client IP field of the DHCP DISCOVER messageAnotherTest
This is the field that tells the DHCP server which IP we want, not setting it is quite silly :P
2021-02-17DHCPClient: Don't reject packets smaller than the max sizeAnotherTest
It's acceptable to have less padding in a packet, the only requirement is to have a single byte of 'END' in the DHCP fields.
2021-02-17DHCPClient: Fix incorrect BOOTP Broadcast flag valueAnotherTest
This is supposed to be the MSB, not the LSB.
2021-02-16WindowServer+LibGUI+LibGfx: Add WindowType::ToolWindowAndreas Kling
Tool windows are secondary windows with a smaller title bar. The sit on the layer above normal windows, and cannot be minimized. These are intended for complex yet non-modal interactions with the content of a primary window, such as find/replace windows, property windows, etc.
2021-02-16WindowServer, LibGUI: Variable minimum window sizesNick Vella
Minimum window size can now be customised and set at runtime via the SetWindowMinimumSize WindowServer message and the set_minimum_size LibGUI::Window method. The default minimum size remains at 50x50. Some behind-the-scenes mechanics had to be added to LibGUI::Window to ensure that the minimum size is remembered if set before the window is shown. WindowServer sends a resize event to the client if it requests a size on create that's smaller than it's minimum size.
2021-02-15WindowServer: Add support for alpha channel based hit testingTom
This enables implementing non-rectangular window shapes, including non-rectangular window frames.
2021-02-15WindowManager: Fix default menu item on key downJean-Baptiste Boric
This fixes the key down behavior on Terminal's Edit menu, which tried to hover the disabled menu item Copy if there was nothing selected.
2021-02-15WindowManager: Select top-level menus with left/right keysJean-Baptiste Boric
2021-02-15WindowManager: Make the Logo key open the system menuJean-Baptiste Boric
2021-02-15WindowServer: Fix double click handling while using cursor trackingTom
We need to first deliver the mouse event and possibly the double click event and record these facts. Then, we need to iterate all global tracking listeners and deliver the mouse event (but not the double click event) to any such listener, unless they already had these events delivered. Fixes #4703
2021-02-15LookupServer: Implement a DNS server :^)Sergey Bugaev
LookupServer can now itself server as a DNS server! To service DNS clients, it uses the exact same lookup logic as it does for LibIPC clients. Namely, it will synthesize records for data from /etc/hosts on its own (you can use this to configure host names for your domain!), and forward other questions to configured upstream DNS servers. On top of that, it implements its own caching, so once a DNS resource record has been obtained from an upstream server, LookupServer will cache it locally for faster future lookups. The DNS server part of LookupServer is disabled by default, because it requires you to run it as root (for it to bind to the port 53) and on boot, and we don't want either by default. If you want to try it, modify SystemServer.ini like so: [LookupServer] Socket=/tmp/portal/lookup SocketPermissions=666 Priority=low KeepAlive=1 User=root BootModes=text,graphical and enable server mode in LookupServer.ini like so: [DNS] Nameservers=... EnableServer=1 If in the future we implement socket takeover for IP sockets, these limitations may be lifted.
2021-02-15LookupServer: Misc tweaksSergey Bugaev
2021-02-15LookupServer: Make lookup() return DNSAnswer's instead of stringsSergey Bugaev
This way, we propagate proper TTL. None of the callers currently care, though.
2021-02-15LookupServer: Move cache check into the outer lookup() methodSergey Bugaev
Where it belongs, alongside the /etc/hosts check. The inner lookup() method is really about talking to a specific DNS server. Also, don't bail out on a empty name. An empty DNSName is actually '.' — a single dot — aka the DNS root.
2021-02-15LookupServer: Store /etc/hosts as Vector<DNSAnswer>Sergey Bugaev
...just like we store m_lookup_cache, in other words. This immediately lets us match on types: for instance we will now only resolve 1.0.0.127.in-addr.arpa to localhost if asked for type PTR, not for type A. In the future, this could also let us have the same /etc/hosts name resolve to *multiple* addresses.
2021-02-15LookupServer: Store DNSName's in HashMap's directlySergey Bugaev
DNSName can now take care of case conversion when comparing using traits. It still intentionally doesn't implement operator ==; you have to explicitly decide whether you want case-sensitive or case-insensitive comparison. This change makes caches (and /etc/hosts) case-transparent: we will now match domains if they're the same except for the case.
2021-02-15LookupServer: Move case randomization into DNSNameSergey Bugaev
* DNSName knows how to randomize itself * DNSPacket no longer constructs DNSQuestion instances, it receives an already built DNSQuestion and just adds it to the list * LookupServer::lookup() explicitly calls randomize_case() if it needs to randomize the case.
2021-02-15LookupServer: Don't cache DNS questionsSergey Bugaev
We should only cache RRs (which we represent as instances of DNSAnswer), now which questions generated them.
2021-02-15LookupServer: Fix serializing name data in DNS answersSergey Bugaev
When serializing a RR of type PTR, we should use the DNS name serialization format, not a raw string.
2021-02-15LookupServer: Move DNS name serialization to DNSName classSergey Bugaev
2021-02-15LookupServer: Move parse_dns_name() -> DNSName::parse()Sergey Bugaev
While at it, refactor it slightly.
2021-02-15LookupServer: Introduce DNSNameSergey Bugaev
This is a wrapper around a string representing a domain name (such as "example.com"). It never has a trailing dot. For now, this class doesn't do much except wrap the raw string. Subsequent commits will add or move more functionality to it.
2021-02-13WindowServer: Improvements to support alpha channel in window framesTom
This fixes some issues handling the alpha channel that may be present in rendered window frames. Fixes #5303
2021-02-12WindowServer: Recompute occlusions when changing window's alpha channelTom
Fixes #4845
2021-02-11WindowServer: Allow different shadows for active/inactive windowsTom
Also allow specifying different shadows for the task and menu bar.
2021-02-11LibCore: Added FileWatcher, a binding for the watch_file syscallDexesTTP
This wrapper abstracts the watch_file setup and file handling, and allows using the watch_file events as part of the event loop via the Core::Notifier class. Also renames the existing DirectoryWatcher class to BlockingFileWatcher, and adds support for the Modified mode in this class.
2021-02-11WindowServer: Fix compositing of fullscreen windowLinus Groh
I honestly don't know the internals of all this and what exactly is going on, but this fixes compositing of the fullscreen window. By trial and error I found that specifically m_invalidated_all needs to be set to false, so it's probably different behaviour in prepare_dirty_rects(), which depends on that... Either way, the code composing all windows in non-fullscreen mode calls Window::clear_dirty_rects() for each, so not doing that for the fullscreen window as well seems like an oversight. Fixes #4810.
2021-02-11WindowServer: Blit backing bitmap with transparency for hung windowsTom
We should respect the opacity of the window when painting the window content of a hung application.
2021-02-11WindowServer: Fix clearing area not covered by backing bitmapTom
We only cleared the area not covered by the backing bitmap if a rendering rectangle intersected with the backing bitmap. But because we are potentially calling the render function many times we need to always clear the area not covered by the backing bitmap, whether it intersects or not. Fixes #5291
2021-02-10NotificationWindow: Set notification text as tooltip contentItamar
2021-02-10WindowServer: Don't re-render the window frame when not neededTom
Merely moving a window shouldn't require re-rendering the window frame anymore now that we cache the rendered frame in bitmaps. This reduces CPU usage significantly when moving windows.
2021-02-10LibWeb+WebContent: Support window.confirm() in OOPWVAndreas Kling
2021-02-10WindowServer: Fix switching between shadows and no shadows with themesTom
We weren't properly handling switching between having a shadow and not having a shadow when switching themes. This allows an empty string in the theme configuration for a shadow path, meaning no shadow should be rendered.
2021-02-10WindowServer: Occlusion calculation fixesTom
We didn't properly determine whether a window was fully covered, which caused some artifacts in certain cases. Fixes #5283
2021-02-09LibWeb+WebContent: Don't relayout page on every scroll eventAndreas Kling
The WebContent process was redoing page layout every time you scrolled the page. This was a huge CPU hog for no reason. Fix this by only doing a relayout when the viewport is resized, not when it moves around.
2021-02-09WindowServer: Allow specifying different shadows for menus and tooltipsTom
Also update the Redmond 2000 theme to drop shadows more Redmond-like.
2021-02-09WindowServer: Vertically maximize windowCamisul
Button now can handle middle and right clicks. Added 2 new handlers in button class: on_right_click for Right mouse button and on_middle_click for middle mouse button. Added functionality to vertically maximize window with middle mouse click on the maximize window button. Also added a way to vertically maximize window by resizing window height-wise lower than the maximum window height.
2021-02-09WindowServer: Recompute occlusions and re-render shadows on theme changeTom
Since theme changes may change geometrics, which are also affected by window shadows, we need to recompute occlusions as well as re-render window frames.
2021-02-09WindowServer: Don't render shadow for frameless windowsTom
Fixes CatDog rendering odd square shadow.
2021-02-09WindowServer: Try harder to avoid re-rendering window shadowTom
We only really need to re-render the simple window shadow when the size of the frame changes. So, for all other cases only re-render the window frame without rendering the shadow.
2021-02-09WindowServer: Implement simple window shadowsTom
This implements simple window shadows around most windows, including tooltips. Because this method uses a bitmap for the shadow bits, it is limited to rectangular window frames. For non-rectangular window frames we'll need to implement a more sophisticated algorithm.
2021-02-08WindowServer: Cache rendered window frame in bitmapTom
This only renders the window frame once until the size of the window changes, or some other event requires re-rendering. It is rendered to a temporary bitmap, and then the top and bottom part is stored in one bitmap as well as the left and right part. This also adds an opacity setting, allowing it to be rendered with a different opacity. This makes it easier to enhance window themes and allows using arbitrary bitmaps with e.g. alpha channels for e.g. shadows.