client-side decoration
{{Short description|Graphical user interface design concept}}
File:GtkHeaderBar on GNOME Files -- 2014-01.png, 2014-01)]]
Client-side decoration (CSD) is the concept of allowing a graphical application software to be responsible for drawing its own window decorations, historically the responsibility of the window manager.{{Cite web|url=https://blogs.gnome.org/mclasen/2014/01/13/client-side-decorations-continued/|title=Client-side decorations, continued|website=blogs.gnome.org|language=en-US|access-date=2019-01-17}}
Sometimes client-side decoration is used to refer to the applications that don't have a traditional title bar. However, this is a misuse of the phrase, as even applications that have a basic title bar can be client side decorated.{{Cite web|url=https://blogs.gnome.org/fmuellner/2015/01/30/a-small-note-on-window-decorations/|title=A small note on window decorations {{!}} Florian Müllner|language=en-US|access-date=2019-11-13}}
By using client-side decoration rather than traditional server-side decoration, applications are able to draw their own title bar, which allows for a wide range of possibilities to customize window decorations and add additional functionality (graphical control elements) into what otherwise would be a typical window manager bar with much empty space in the maximized windows.{{cite web | url=https://www.phoronix.com/scan.php?page=news_item&px=GNOME-CSD-Initiative | title=The CSD Initiative Is Pushing For Apps To Abandon Title Bars In Favor Of Header Bars - Phoronix | publisher=Phoronix | access-date=2018-01-28}}
Terminology
The term Client-Side Decoration comes from the X Window System, where a client is the application which renders a window and sends it to the X server that controls the display. The alternative is called Server-Side Decoration (SSD) even though on X the decoration is drawn by the window manager, which is not actually the "server". Those terms are also used in Wayland, where a client is the application, which renders a window and sends it to the Wayland server, which controls the display and also functions as a compositing window manager.
Implementations
= Widget toolkits =
== GTK ==
GTK was the first GUI toolkit on Linux that implemented client-side decoration using the GtkHeaderBar widget.{{Cite web|url=https://developer.gnome.org/gtk3/stable/GtkHeaderBar.html |title=GtkHeaderBar: GTK+ 3 Reference Manual |website=developer.gnome.org |access-date=2019-01-17}}
GtkHeaderBar merges the title bar, menu bar and tool bar into one unified horizontal bar in order to give more space to the application content, potentially reducing the amount of wasted space by showing empty bars. This can help to achieve a flexible UI and consistent UX across different computer form factors from desktop systems to small form factor devices by removing the traditional desktop-oriented parts from applications. These have first-class support in GNOME Shell and are widely used by GNOME applications.
== UWP ==
Universal Windows Platform applications can choose to draw their own title bars.{{Cite web |url=https://docs.microsoft.com/en-us/windows/uwp/design/shell/title-bar |title=Title bar customization - Windows UWP applications |last=mijacobs |website=docs.microsoft.com |language=en-us |access-date=2019-01-17}}
== macOS ==
In macOS, AppKit applications use client-side decoration when using the NSWindow widget.{{Cite web |url=https://developer.apple.com/documentation/appkit/nswindow |title=NSWindow - AppKit {{!}} Apple Developer Documentation |website=developer.apple.com |access-date=2019-06-07}}
== Electron ==
Electron has the option to use a frame-less window (without toolbar, menu bar, tabs), however the application is responsible for drawing its own shadows.{{Cite web |url=https://electronjs.org/docs/api/frameless-window |title=Frameless Window {{!}} Electron |website=electronjs.org |language=en-US |access-date=2019-01-17}}
== Deepin Tool Kit ==
File:Deepin File Manager 15.4 español.png File Manager, a Qt-based application with client-side decoration.]]
Deepin Tool Kit is a small modified widget toolkit based on Qt6, it is used by the Deepin Desktop Environment.
= Applications =
Notable applications with client-side decoration:
- Steam, used its own widget toolkit called "VGUI" before over to a HTML-based UI rendered by Steam's embedded CEF in 2023, though some dialogs are still either rendered natively or use VGUI.https://youtube.com/watch?v=e8jv24NjOWQ
- Firefox uses client-side decorations when the title bar is disabled.
- Google Chrome and other Chromium based browsers use client-side decorations on Windows and macOS, and support both client and server side decorations on Linux.
- Discord is an Electron app and thus supports client and server side decorations on Windows, macOS, & Linux.
= Display servers =
== Wayland ==
Wayland was designed to have client-side decorations (including the shadows of windows) by default, but has an optional protocol, known as xdg-decoration, which allows an application (client) to query whether the window manager supports server-side decoration and if so for a client to request it.{{Citation |title=Wayland protocol development |date=2019-10-07 |url=https://github.com/wayland-project/wayland-protocols |publisher=Wayland |access-date=2019-11-13}}
- Mutter, the compositor used by GNOME Shell, under Wayland only supports client side decoration.{{cite web|url=https://blogs.gnome.org/tbernard/2018/01/26/csd-initiative/|title=Introducing the CSD Initiative – Space and Meaning|author=Bernard, Tobias|publisher=GNOME|access-date=2018-01-28}}
- KWin, the compositor used by KDE Plasma, supports both client and server side decoration, defaulting to the latter on Wayland.{{Cite web |last=Flöser |first=Martin |date=2018-01-27 |title=Server side decorations and Wayland |url=https://blog.martin-graesslin.com/blog/2018/01/server-side-decorations-and-wayland/ |access-date=2025-04-29 |website=Martin's Blog |language=en-US}}
- cosmic-comp, the compositor used by COSMIC, supports both client and server side decoration, defaulting to the former.{{Cite web |title=GTK and QT applications ignore the COSMIC header · Issue #1132 · pop-os/cosmic-comp |url=https://github.com/pop-os/cosmic-comp/issues/1132 |access-date=2025-04-29 |website=GitHub |language=en}} (cosmic-comp is not an X11 window manager.)
- wl-roots, the Wayland compositor used by Sway, [https://labwc.github.io/ labwc], [https://wayfire.org/ Wayfire], and other smaller Wayland compositors, support both client and server side decoration.{{Cite web |title=wlroots / wlroots · GitLab |url=https://gitlab.freedesktop.org/wlroots/wlroots |access-date=2025-04-29 |website=GitLab |language=en}}
Limitations
If the application hangs, the user cannot close it by clicking the close button in the window frame.{{Cite web |last=Zahorodnii |first=Vlad |date=2020-07-23 |title=CSD support in KWin |url=https://blog.vladzahorodnii.com/2020/07/23/csd-support-in-kwin/ |access-date=2024-03-05 |website=Vlad Zahorodnii's Blog |language=en}}
History
- In 2008 Adobe released Photoshop CS4 that uses client-side decorations.
- In 2012 Microsoft uses client-side decorations in their new Metro design language by adding toolbar objects like back buttons to the windows title bar.
- In 2013 GTK added support for client-side decorations with the release of GTK 3.10.{{Cite web |url=https://lwn.net/Articles/568191/ |title=GTK+ 3.10 released [LWN.net] |website=lwn.net |access-date=2019-01-17}}