Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorEngine::EngineSlot Struct Reference

One engine's view of a window: which managed slot it occupies (or that it is floating / unmanaged) in THAT engine's mode. More...

#include <PhosphorEngine/WindowPlacement.h>

Public Member Functions

bool operator== (const EngineSlot &o) const
bool operator!= (const EngineSlot &o) const
bool isEmpty () const

Public Attributes

QString state
 engine-defined token: snap "snapped"/"floating"; autotile "tiled"/"floating" ("free" retired)
QStringList zoneIds
 snap slot — zone UUIDs (first is primary); empty for autotile
int order = -1
 autotile slot — tile index within the screen; -1 for snap
QHash< int, QStringList > zonesByDesktop
 Snap slot — the zones this window occupies on EACH desktop it is present on, keyed by x11 desktop number.

Detailed Description

One engine's view of a window: which managed slot it occupies (or that it is floating / unmanaged) in THAT engine's mode.

State is PER ENGINE — a window can be snapped in the snap engine AND floating in the autotile engine at the same time, each engine remembering the window's state in its OWN mode.

The slot is an IDENTIFIER, never a rectangle: zoneIds for the snap engine, order for the autotile engine. A managed rect (the zone or tile geometry) is NEVER stored here — that is what keeps the shared free/float geometry from being poisoned by a zone/tile rect (the per-mode geometry leak this model fixes). The window's actual free/float position lives once, shared, in WindowPlacement::freeGeometryByScreen.

Member Function Documentation

◆ isEmpty()

bool PhosphorEngine::EngineSlot::isEmpty ( ) const
inline

◆ operator!=()

bool PhosphorEngine::EngineSlot::operator!= ( const EngineSlot & o) const
inline

◆ operator==()

bool PhosphorEngine::EngineSlot::operator== ( const EngineSlot & o) const
inline

Member Data Documentation

◆ order

int PhosphorEngine::EngineSlot::order = -1

autotile slot — tile index within the screen; -1 for snap

◆ state

QString PhosphorEngine::EngineSlot::state

engine-defined token: snap "snapped"/"floating"; autotile "tiled"/"floating" ("free" retired)

◆ zoneIds

QStringList PhosphorEngine::EngineSlot::zoneIds

snap slot — zone UUIDs (first is primary); empty for autotile

◆ zonesByDesktop

QHash<int, QStringList> PhosphorEngine::EngineSlot::zonesByDesktop

Snap slot — the zones this window occupies on EACH desktop it is present on, keyed by x11 desktop number.

A window on one desktop leaves this empty and is described by zoneIds alone; a window on several (sticky, or a {1,2} span) can be snapped somewhere different on each, and one zone list cannot say that.

Held INSIDE the engine slot rather than as sibling records, because the store keeps at most one record per live instance and the restore paths depend on that uniqueness. Per-desktop zones are the snap engine's business, and the slot is exactly where per-engine business belongs. The tiling engines keep no per-desktop analogue: a tile order restores into one desktop and the membership pass places the window afresh on the others, which is a graceful degradation rather than a wrong placement, since a tile order is only meaningful against the layout it was captured in.

zoneIds stays populated with the current context's zones, so every reader that predates this field keeps working unchanged.


The documentation for this struct was generated from the following file: