Skip to main content

Module workspace

Module workspace 

Source
Expand description

ext_workspace_manager_v1, the virtual desktops a pager reads and switches. ext_workspace_manager_v1: the virtual desktops a pager reads and switches.

The standard protocol is served rather than an interface of this tree’s own so that the desktop shell and any other pager (a panel, a dock) read the desktops the way they read them from every other compositor. The compositor keeps only what the protocol shows: how many desktops there are and which is current, as the window policy last said (Command::Desktops), one desktop and the first before it says anything. Which desktop a window is on is the policy’s alone: it hides a window on another desktop through States::hidden, and a taskbar learns of it through the window list, where the hidden window leaves every output while it stays listed.

Every bound manager sees one workspace group spanning every output, since a desktop here covers the whole layout, and in it a workspace per desktop, named from one and placed by a single coordinate, the desktop’s index. A pager’s activate is recorded against its manager and acted on at the commit that ends the pager’s atomic batch, as Event::ActivateDesktop to the policy; nothing is sent back then, since the policy’s answer, a Command::Desktops, is what moves the state every pager sees, so a switch the policy declines leaves the pager showing what the compositor shows.

Structs§

HandleData
The user data of a workspace handle: the manager it was sent on and the desktop it stands for, counted from zero.
Manager 🔒
One bound manager: its group, a handle per desktop in desktop order, and the switch a pager asked for ahead of its commit.
WorkspaceState
The desktops and the managers bound to them.

Functions§

active_changes 🔒
The desktops whose active bit moves when the current one changes.
bounded 🔒
The desktops a command describes, bounded: at least one, and the current among them.
coordinates 🔒
A desktop’s coordinates: one dimension, its index, as the array of words the protocol carries in the byte order the client reads them back in.
output_bound
A client bound a wl_output of an output its group already spans: the group enters it, since an enter reaches only the objects the client held when it was sent.
outputs_changed
The layout’s outputs changed: every group enters the new ones and leaves the gone ones.
send_workspace 🔒
Send a pager a handle for desktop index, assigned to its group, or None where its connection is gone.
set_desktops
The policy said how many desktops there are and which is current: every pager is told what changed, in one batch.
spanned_outputs 🔒
The outputs a group spans: every screen of its own, never a view onto another’s.
state_bits 🔒
A desktop’s state bits: active for the current one, none for the rest.