IT lexicon › Programming › _NET_WM_DESKTOP

_NET_WM_DESKTOP

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

The EWMH property on a window that says which virtual desktop it lives on, counted from zero, or 0xFFFFFFFF for all of them.

Where a window belonged was for years the window manager's private business: GNOME's _WIN_WORKSPACE and kwm's KWM_WIN_DESKTOP were two incompatible answers to the same question. Around 2000 EWMH merged them into a single CARDINAL on the window itself. A program may set it before the window is mapped, as a request for a starting desktop, but once the window manager has taken the window over the property belongs to it: updated on every move, removed when the window is withdrawn. Anyone else who wants to move the window sends a ClientMessage to the root window instead, carrying the new number and a source indication, 1 for an application and 2 for a pager or the user, so the manager can treat an application's nagging differently from a click in the pager.

The value 0xFFFFFFFF means every desktop and is what a sticky window looks like under the hood; xprop prints it as 4294967295, which has puzzled more than one person. A nice touch in the spec is that the property must be left in place when the window manager exits, for instance when it loses WM_Sn to a successor started with --replace: the newcomer reads the numbers and puts every window back where it was. wmctrl -t and the rules in Openbox, FVWM and devilspie that send a given class to desktop 3 all go through this one small number. Under Wayland it is the compositor's own affair, and scripts that shuffle windows between workspaces have had to be rewritten for each one.

← Back to the lexicon