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:
| role | Wayland | Win32 | AppKit |
|---|---|---|---|
Panel | zwlr_layer_surface_v1 | a topmost tool window; an appbar when it reserves an edge | a non-activating NSPanel |
Popup | xdg_popup | a WS_POPUP tool window | a 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.
- Panel
Anchor - The monitor edges a panel is held against.
- Panel
Desc - Where a panel goes and how it behaves.
- Popup
Desc - Where a popup goes.
Enums§
- Panel
Keyboard - Whether a panel takes the keyboard.
- Panel
Layer - The band of the stack a panel lives in, bottom to top.
- Popup
Input - What input a popup takes.
- Popup
Placement - Which side of its anchor a popup opens on.
- Reserve
- Whether a panel keeps other windows out of its space.
- Window
Role - What kind of window to create — see the module docs.