Copyright 2026 WayRay Contributors SPDX-License-Identifier: MPL-2.0 This protocol allows an external window manager process to control window layout, focus, and keybindings in the WayRay compositor. Only one WM client may be bound at a time. If a second WM binds, the first receives a "replaced" event and should disconnect. Window management follows a two-phase transaction model: 1. Manage phase: WM makes policy decisions (dimensions, focus, decorations) 2. Render phase: WM specifies visual placement (position, z-order, visibility) The main entry point for external window managers. A WM client binds this global to receive window lifecycle events and participate in the two-phase manage/render transaction model. Sent when a new toplevel is mapped. The WM receives a wayray_wm_window_v1 object to interact with this window. Property events (title, app_id, size_hints) follow immediately, terminated by a done event. Sent when a toplevel is unmapped and destroyed. The wayray_wm_window_v1 object becomes inert after this event. Sent when state changes require WM policy decisions. The WM should evaluate pending changes and respond with policy requests on the affected window objects, then call manage_done. Sent after clients have acknowledged configures and committed. The WM should set visual placement (position, z-order, visibility) on window objects, then call render_done. All changes are applied atomically. Sent when a new output is available for window placement. Sent when an output is no longer available. Sent when another WM client has connected and taken over. The old WM should disconnect gracefully after receiving this event. Signals that the WM has finished making policy decisions for this manage phase. The compositor will send configures to affected windows. Signals that the WM has finished specifying visual placement. The compositor will apply all changes atomically in one frame. Creates a wayray_wm_seat_v1 object for registering keybindings and initiating interactive move/resize operations. Creates a wayray_wm_workspace_v1 object for managing virtual desktops and window-to-workspace assignments. Destroy this manager object. The compositor returns to its built-in window management. Represents a single toplevel window. The compositor sends property events and the WM sends policy/placement requests. Policy requests (propose_dimensions, set_focus, etc.) should be sent during the manage phase. Visual placement requests (set_position, set_z_*, etc.) should be sent during the render phase. Null if this window has no parent. A value of 0 means unconstrained. Respond with grant_fullscreen or deny_fullscreen during manage phase. Actual committed size after client draws. Process all preceding property events atomically. Register keybindings, create binding modes, and initiate interactive move/resize operations. Empty mode string means default mode. Empty string returns to default mode only. Create and manage virtual desktops. Supports both exclusive workspaces and tag-based systems (windows on multiple tags simultaneously). Window is visible when any tag matches the output's active tags.