Generated by GPT-5-mini| xdg-shell | |
|---|---|
| Name | xdg-shell |
| Title | xdg-shell |
| Developer | Wayland community |
| Operating system | Linux |
| Platform | Wayland |
| License | MIT License |
xdg-shell is a Wayland protocol extension that defines how client applications create and manage toplevel windows and popups within compositor-managed surfaces. It specifies roles, state transitions, and interactive behaviors used by popular compositors and toolkits to provide desktop-style windowing on systems running Wayland-based stacks.
xdg-shell provides a standardized contract between Wayland compositors and client toolkits such as GTK, Qt (software), and EFL (software). The protocol complements core Wayland objects like wl_surface and wl_buffer by introducing role-oriented objects used by compositors including Weston (compositor), Mutter, and KWin. Implementations interoperate across distributions such as Ubuntu (operating system), Fedora (operating system), and Debian, enabling integration with display managers like GDM (GNOME Display Manager) and SDDM. xdg-shell's semantics influence windowing behaviors visible in desktop environments including GNOME and KDE Plasma.
The protocol defines requests and events exchanged over Wayland display connections established via libwayland-client and libwayland-server. It introduces objects such as xdg_surface and xdg_toplevel that attach to wl_surface instances and mediate state changes coordinated with compositors developed by teams at Collabora, Red Hat, and SUSE. The architecture allows compositors to advertise extensions while clients query support through the Wayland global registry mechanism handled by Wayland (protocol) libraries. Message ordering and synchronization are implemented using frame callbacks akin to techniques used by OpenGL compositors and accelerated surfaces driven by drivers from Intel Corporation and NVIDIA.
xdg-shell formalizes roles for surfaces, distinguishing between toplevel windows, popups, and transient surfaces used by applications like Firefox and Chromium (web browser). Role binding ensures that a given wl_surface assumes exactly one role, preventing conflicts similar to windowing models enforced by X.Org protocols. Role-related requests include set_title and set_app_id, used by compositors for integration with taskbars and application launchers such as GNOME Shell and Plasma Workspace. Modal dialogs and context menus rely on popup semantics analogous to patterns in Wayland protocols adopted by toolkits maintained by contributors at The GNOME Project and KDE e.V..
xdg-shell specifies state transitions including maximize, minimize, fullscreen, and resize operations coordinated with compositor policies found in Compositing window manager implementations like Enlightenment and Sway (window manager). The protocol exposes configure events that communicate allowed sizes and states from compositor to client, mirroring negotiation patterns present in X11 ICCCM and EWMH interactions historically used by Fluxbox and Openbox. Input focus, activation, and z-order are mediated through compositor-driven requests and global focus policies implemented by projects such as Wayfire and Cage (wayland).
Reference server-side implementations appear in compositors including Weston (compositor), Mutter, KWin, Sway (window manager), and wayland-protocols test suites maintained by developers at Freedesktop.org. Client-side bindings are provided by libraries and toolkits like libwayland-client, GDK, QtWayland, and language bindings produced by contributors at GNOME Foundation and KDE e.V.. Hardware acceleration and buffer management integrate with graphics stacks such as Mesa (software), X.Org, and drivers from Arm Ltd., facilitating hi-DPI and multi-monitor setups used by vendors like Dell and Lenovo.
xdg-shell emerged from discussions among Wayland contributors and desktop maintainers seeking to replace ad hoc extensions with a unified protocol; stakeholders included engineers from Red Hat, Collabora, and SUSE. The specification evolved through drafts in repositories hosted by Freedesktop.org and collaborative review at events like FOSDEM and Linux Plumbers Conference. The design addressed limitations of legacy X11-era protocols used by GNOME and KDE while aligning with compositor goals espoused by projects such as Wayland (protocol) and Weston (compositor).
xdg-shell separates client intent from compositor policy, allowing compositors to enforce restrictions relevant to sandboxed environments like Flatpak and Snapcraft while coordinating with display servers such as systemd-managed sessions. Compatibility layers and X11 window managers including XWayland bridge legacy X.Org applications to Wayland compositors, requiring careful mapping of hints and events to preserve behavior expected by desktop shells like GNOME Shell and Plasma Workspace. Security considerations include surface isolation, focus stealing prevention, and privilege separation employed by distributions and projects including Canonical and Red Hat to maintain secure desktop sessions.
Category:Wayland protocols