Skip to main content

Module role

Module role 

Source
Expand description

What kind of window a WindowDesc asks for: an application window, a panel, or a popup.

Most programs want WindowRole::Toplevel, the window every desktop has. The other two are for desktop furniture — a status bar, a launcher, a notification, a menu opened from a bar — which every window system has a different mechanism for, and which no program should have to write three times:

roleWaylandWin32AppKit
Panelzwlr_layer_surface_v1a topmost tool window; an appbar when it reserves an edgea non-activating NSPanel
Popupxdg_popupa WS_POPUP tool windowa child NSPanel

Which roles a backend can build is in its caps — ShellCaps::PANEL and ShellCaps::POPUP — and asking for one it cannot is ShellError::Unsupported, never a toplevel in its place: a bar that silently became a normal window would cover the desktop it was meant to sit at the edge of.

Structs§

Margins
Space around a panel, in logical units.
PanelAnchor
The monitor edges a panel is held against.
PanelDesc
Where a panel goes and how it behaves.
PopupDesc
Where a popup goes.

Enums§

PanelKeyboard
Whether a panel takes the keyboard.
PanelLayer
The band of the stack a panel lives in, bottom to top.
PopupInput
What input a popup takes.
PopupPlacement
Which side of its anchor a popup opens on.
Reserve
Whether a panel keeps other windows out of its space.
WindowRole
What kind of window to create — see the module docs.