Snap-mode window placement: commit/uncommit confirmations, the snap-restore resolution chain, resnap and snap-all batch placement, daemon-driven navigation (move/focus/swap/push/by-number/rotate/cycle/restore), and snap-mode float. Geometry application flows BACK to the compositor over org.phosphor_works.Placement.WindowTracking (applyGeometryRequested, applyGeometriesBatch) — this interface carries no signals.
| Well-known name | org.phosphor_works.Placement.Snap |
| Source XML | org.phosphor_works.Placement.Snap.xml |
| Methods | 29 |
| Signals | 0 |
| Properties | 0 |
Confirm a single-zone snap. Refused for a window that is gone, an unknown screen, a window not on the desktop it would land on, a window on another activity, or a zone that screen's layout lacks. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| zoneId | in | s (string) | |
| screenId | in | s (string) |
Confirm a multi-zone (zone-span) snap, checked like windowSnapped for every zone. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| zoneIds | in | as (array<string>) | |
| screenId | in | s (string) |
Confirm an unsnap. A window left with no zone and no float also forgets its snapped zone for the next time it opens. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) |
Confirm the effect's snap-all placement. An isRestore entry unsnaps the window and drops its float-back on that screen. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| entries | in | a(sssb) (array<struct(string,string,string,bool)>) | Array of (windowId, zoneId, screenId, isRestore). |
Record that a window class was USER-snapped (not auto-snapped), which feeds the snap-intent (user-snapped-class) learning. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| wasUserInitiated | in | b (bool) |
Resolve a snap into the last used zone, and commit it. Out-args carry the target geometry, and shouldSnap=false means no placement applies. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| windowScreenId | in | s (string) | |
| sticky | in | b (bool) | |
| snapX | out | i (int32) | |
| snapY | out | i (int32) | |
| snapWidth | out | i (int32) | |
| snapHeight | out | i (int32) | |
| shouldSnap | out | b (bool) |
Resolve a snap into the window's SnapToZone-rule-defined zone(s), and commit it. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| windowScreenId | in | s (string) | |
| sticky | in | b (bool) | |
| snapX | out | i (int32) | |
| snapY | out | i (int32) | |
| snapWidth | out | i (int32) | |
| snapHeight | out | i (int32) | |
| shouldSnap | out | b (bool) |
Resolve a snap into the first empty zone, and commit it. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| windowScreenId | in | s (string) | |
| sticky | in | b (bool) | |
| snapX | out | i (int32) | |
| snapY | out | i (int32) | |
| snapWidth | out | i (int32) | |
| snapHeight | out | i (int32) | |
| shouldSnap | out | b (bool) |
Run the full snap-restore resolution (placement-store restore + placement-rule / empty-zone / last-zone fallback chain) in one call. It claims the window's placement record and commits the snap it answers, so only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| screenId | in | s (string) | |
| sticky | in | b (bool) | |
| windowKind | in | i (int32) | Structural kind of the opening window (0=Unknown, 1=Normal, 2=Transient). |
| restoreReason | in | i (int32) | Why this resolve is running (0=Open, 1=Unminimize, 2=PendingSweep, 3=DesktopArrival, 4=DaemonRestartSweep, 5=DesktopReapply). Open covers a genuine window open, including a session restore and a deferred-routing flush. The others re-resolve windows that are already open and on screen. DesktopReapply re-applies only the zone the window already holds where it landed, after a move that did not continue an open. Gates the open claim, the FIFO record match (open only, plus a sweep of a window no engine ever captured) and the cross-desktop session restore. Replaces the older isOpenPath bool, which could not distinguish the desktop-arrival re-drive from a user action. |
| minWidth | in | i (int32) | Client-declared minimum width. Accepted and ignored: the cross-screen tile reclaim it sized was removed. |
| minHeight | in | i (int32) | Client-declared minimum height. Accepted and ignored. |
| snapX | out | i (int32) | |
| snapY | out | i (int32) | |
| snapWidth | out | i (int32) | |
| snapHeight | out | i (int32) | |
| shouldSnap | out | b (bool) |
Resnap all windows from the previous layout to the current layout.
No arguments.
Resnap windows to their current zone assignments, only on screens that snap and that are not disabled.
| Arg | Direction | Type | Description |
|---|---|---|---|
| screenFilter | in | s (string) | When non-empty, only resnap windows on this screen. |
Resnap windows from autotile to manual zones using the explicit autotile window order. Only on a screen that snaps and is not disabled, and only for live windows that are not excluded there.
| Arg | Direction | Type | Description |
|---|---|---|---|
| autotileWindowOrder | in | as (array<string>) | |
| screenId | in | s (string) |
Calculate zone assignments for all provided windows (effect-local snap_all path applies the geometries). It records each window's floating spot first, so only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowIds | in | as (array<string>) | |
| screenId | in | s (string) | |
| results | out | a(sssiiii) (array<struct(string,string,string,int32,int32,int32,int32)>) | Array of (windowId, targetZoneId, sourceZoneId, x, y, width, height). |
Trigger snap-all-windows from a daemon shortcut (emits WindowTracking.snapAllWindowsRequested toward the effect). Refused, with a log line, for a screen the daemon does not know, one that tiles or scrolls, and one where snapping is switched off or disabled.
| Arg | Direction | Type | Description |
|---|---|---|---|
| screenId | in | s (string) |
Process a batch of resnap entries (JSON payload) and emit the resulting WindowTracking.applyGeometriesBatch. An entry a snap shortcut could not make is dropped, and so is a restore entry ('restore', which unsnaps the window and puts it back at the entry's rect) from any caller but the registered compositor bridge.
| Arg | Direction | Type | Description |
|---|---|---|---|
| resnapData | in | s (string) |
Move the focused window to an adjacent zone.
| Arg | Direction | Type | Description |
|---|---|---|---|
| direction | in | s (string) | left, right, up, or down. |
Focus a window in an adjacent zone.
| Arg | Direction | Type | Description |
|---|---|---|---|
| direction | in | s (string) |
Push the focused window to the first empty zone.
| Arg | Direction | Type | Description |
|---|---|---|---|
| screenId | in | s (string) | A named screen is the target, using its layout for the desktop it shows. Empty acts like the shortcut: the focused window's own screen when it is snapped, else the cursor's, else the last active one. |
Take the focused window out of its zone and float it at its float-back position and size.
No arguments.
Swap the focused window with the window in an adjacent zone.
| Arg | Direction | Type | Description |
|---|---|---|---|
| direction | in | s (string) |
Snap the focused window to a zone by its number.
| Arg | Direction | Type | Description |
|---|---|---|---|
| zoneNumber | in | i (int32) | Zone number, 1-based; 1-9 when no screen is named. |
| screenId | in | s (string) | A named screen is the target, using its layout for the desktop it shows. Empty acts like the shortcut: the focused window's own screen when it is snapped, else the cursor's, else the last active one. |
Rotate windows in the layout for a screen. Screens that tile or scroll, and disabled ones, are left alone.
| Arg | Direction | Type | Description |
|---|---|---|---|
| clockwise | in | b (bool) | |
| screenId | in | s (string) | Screen to rotate on (empty = all screens). |
Cycle focus between windows stacked in the same zone.
| Arg | Direction | Type | Description |
|---|---|---|---|
| forward | in | b (bool) |
Snap a specific window to a specific zone by ID.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| zoneId | in | s (string) |
Swap two snapped windows by ID. Each takes the other's whole span, in the context that span is held in, and the swap is refused where a snap shortcut could not make it.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId1 | in | s (string) | |
| windowId2 | in | s (string) |
Toggle a window between floating and its zone on a snapping screen. Refused where the float shortcut could not act. An empty screen means the window's own, and a screen the window is not on is refused, with a log line.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| screenId | in | s (string) |
Float or unfloat a window on the snapping screen it is on. Refused where the float shortcut could not act.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| floating | in | b (bool) |
Calculate unfloat restore geometry and zone IDs in a single call.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) | |
| screenId | in | s (string) | |
| result | out | (bassiiii) (struct(bool,array<string>,string,int32,int32,int32,int32)) | Struct: (found, zoneIds, screenName, x, y, width, height). |
Unsnap a window and keep its zone as the pre-float home. It does not float the window, so call setWindowFloat(true) after it. Only the registered compositor bridge may call it, and any other caller is answered with AccessDenied.
| Arg | Direction | Type | Description |
|---|---|---|---|
| windowId | in | s (string) |