IT lexicon › Programming › layer-shell

layer-shell

Programming På svenska → Updated: 2026-10-10

The protocol that gives panels, wallpapers and lock screens a place in Wayland — surfaces anchored to a screen edge, stacked in one of four layers, able to reserve space so ordinary windows stay clear of the bar.

xdg-shell describes application windows, but a desktop also consists of things that are not windows: a bar along the top, a background at the bottom, a notification in a corner, a lock screen over everything. In X, EWMH handled this with window types and _NET_WM_STRUT; Wayland had nothing until Drew DeVault wrote wlr-layer-shell in 2018 for Sway's own tools swaybar, swaybg and swaylock. A client requests a layer_surface on a given output in one of the layers background, bottom, top or overlay, anchors it to one or more edges, sets margins and an exclusive zone that the compositor subtracts from the area ordinary windows may use. Keyboard focus is off unless the client asks for it.

Despite the "wlr" in its name the protocol travelled well beyond wlroots: KWin supported it from Plasma 5.20 in 2020, Mir and Hyprland do too, and the gtk-layer-shell library let GTK programs use it without touching raw Wayland. Waybar, wofi, mako and fuzzel are written against it. The big holdout is Mutter: GNOME Shell draws its own panel and sees no reason to let anyone else's in. That is why a tiling user's toolbox rarely works on GNOME, and why attempts to turn it into a vendor-neutral ext-layer-shell have been debated in wayland-protocols for years.

← Back to the lexicon