Skip to main content
Version: 2.2 (dev)

Scene graph

SomeWM updates the wlroots scene from Clay’s layout result. Each floating root has a band, stored as Clay’s zIndex, which determines its drawing order.

Bands​

Lower bands draw first. Within a band, roots draw in declaration order, so a later popup appears above an earlier one. The values come from Z_* in declare.c:

BandWhat is there
-8a layer-shell surface in the background layer
-6a client of type desktop
-4the wallpaper wibox, and a wibox of type desktop or splash
-2a layer-shell surface in the bottom layer
10a client marked below
20a normal client
25a wibox placed by its geometry, and a wibar that is not ontop and reserves no space
30a client marked above
38the backdrop behind a fullscreen client
40a fullscreen client
50a client marked ontop
60an ontop wibar
70a layer-shell surface in the top layer
80an ontop wibox: popups, menus, tooltips, and an xdg popup over its owner
90a notification
100a layer-shell surface in the overlay layer
110an override-redirect X11 window: a menu, a tooltip, a drag icon
120a drag icon
200, 210, 220the lock screen: backdrop, cover, surfaces
32765, 32766Clay's inspector panel
32767the pointer

A wibar in the flow has no band: it is part of the output's column with the workarea. A tiled client has none either. Its frame is a cell of the workarea. Its SURFACE element floats at the client's band, attached to its slot, and places the surface tree that displays client content. The dump prints the band after band on a root line, and the inspector shows it as the floating element's z-index.

Where things go​

Floating changes placement, not the normal client band of 20. below, above and ontop change stacking. A fullscreen client uses band 40, or 50 when also ontop.

A wibox's band follows its type and ontop:

You writeBand
wibox { ... } placed by its geometry25
awful.wibar { position = "top" }in the flow. The workarea moves down
awful.wibar { ontop = true }60, over the clients. Reserves no space
wibox { type = "desktop" }-4, with the wallpaper
awful.menu, a tooltip, an awful.popup with ontop = true80
a naughty notification90

A fullscreen client covers a bar in the flow. An ontop bar remains above it. Notifications appear above both.

Struts and the workarea​

The output is a column of bars and workarea. Clay assigns the remaining space to the workarea. screen.workarea reports its solved rectangle.

For example, a 720-pixel-high screen with one 32-pixel top bar has a 688-pixel-high workarea.

Stacking within a band​

Two clients in the same band are ordered by the client stack, which c:raise() and c:lower() change (Client Stacking). Under max and magnifier, a floating client is above the layout's clients whatever the raise order, and a transient of such a client is above every client of that layout.