Client-side decoration

Source: Wikipedia, the free encyclopedia.
Example of an application that uses Client-Side Decoration to draw its own window controls. (GtkHeaderBar widget on GNOME Files, 2014-01)

Client-side decoration (CSD) is the concept of allowing a

window decorations, historically the responsibility of the window manager.[1]

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.[2]

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.[3]

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.[4]

GtkHeaderBar merges the

GNOME applications
.

UWP

Universal Windows Platform applications can choose to draw their own title bars.[5]

macOS

In

AppKit applications use client-side decoration when using the NSWindow widget.[6]

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.[7]

Deepin Tool Kit

Deepin File Manager, a Qt-based application with client-side decoration.

Deepin Desktop Environment
.

Applications

Notable applications with client-side decoration:

  • Steam, uses its own widget toolkit called "VGUI".
  • 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 decorations on 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.[8] Mutter, the compositor used by GNOME Shell, under Wayland only supports client side decoration,[9] whilst KWin
supports both client and server side decoration.

Limitations

If the application hangs, the user cannot close it by clicking the close button in the window frame.[10]

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.[11]

See also

References

  1. ^ "Client-side decorations, continued". blogs.gnome.org. Retrieved 2019-01-17.
  2. ^ "A small note on window decorations | Florian Müllner". Retrieved 2019-11-13.
  3. Phoronix
    . Retrieved 2018-01-28.
  4. ^ "GtkHeaderBar: GTK+ 3 Reference Manual". developer.gnome.org. Retrieved 2019-01-17.
  5. ^ mijacobs. "Title bar customization - Windows UWP applications". docs.microsoft.com. Retrieved 2019-01-17.
  6. ^ "NSWindow - AppKit | Apple Developer Documentation". developer.apple.com. Retrieved 2019-06-07.
  7. ^ "Frameless Window | Electron". electronjs.org. Retrieved 2019-01-17.
  8. ^ Wayland protocol development, Wayland, 2019-10-07, retrieved 2019-11-13
  9. ^ Bernard, Tobias. "Introducing the CSD Initiative – Space and Meaning". GNOME. Retrieved 2018-01-28.
  10. ^ Zahorodnii, Vlad (2020-07-23). "CSD support in KWin". Vlad Zahorodnii's Blog. Retrieved 2024-03-05.
  11. ^ "GTK+ 3.10 released [LWN.net]". lwn.net. Retrieved 2019-01-17.