Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorCompositor::AutotileStateHelpers Namespace Reference

Compositor-agnostic autotile state accessors and pure helpers. More...

Classes

struct  AutotileWindowState
 Bundles per-window state maps for cleanup operations. More...
 

Functions

bool isTiledWindow (const BorderState &border, const QString &windowId)
 
bool shouldShowBorderForWindow (const BorderState &border, const QString &windowId)
 
void cleanupClosedWindowState (const QString &windowId, BorderState &border, AutotileWindowState &state)
 Clean up all state tracking for a closed window.
 
void addTiledOnScreen (BorderState &border, const QString &screenId, const QString &windowId)
 Add a window to a screen's tiled bucket. Idempotent.
 
bool removeTiledOnScreen (BorderState &border, const QString &screenId, const QString &windowId)
 Remove a window from a specific screen's tiled bucket.
 
void removeFromOtherScreens (BorderState &border, const QString &windowId, const QString &keepScreenId)
 Remove a window from every screen's tiled bucket EXCEPT keepScreenId (cross-screen transfer: a window is tile-managed by one screen at a time, so re-recording on a new screen first strips any stale sibling claim).
 
bool removeFromAllScreens (BorderState &border, const QString &windowId)
 Remove a window from every screen's tiled bucket.
 
QSet< QString > tiledOnScreen (const BorderState &border, const QString &screenId)
 Detached copy of the set of tiled windows on a given screen (QHash::value copy, not a reference).
 
QVector< QPair< QString, QString > > allTiledPairs (const BorderState &border)
 Collect every tiled (windowId, screenId) pair for bulk operations (hide-titlebars toggle on).
 

Detailed Description

Compositor-agnostic autotile state accessors and pure helpers.

These functions operate on BorderState and other pure data structures without touching any compositor APIs. Shared by all compositor plugins.

Function Documentation

◆ addTiledOnScreen()

void PhosphorCompositor::AutotileStateHelpers::addTiledOnScreen ( BorderState border,
const QString &  screenId,
const QString &  windowId 
)
inline

Add a window to a screen's tiled bucket. Idempotent.

◆ allTiledPairs()

QVector< QPair< QString, QString > > PhosphorCompositor::AutotileStateHelpers::allTiledPairs ( const BorderState border)
inline

Collect every tiled (windowId, screenId) pair for bulk operations (hide-titlebars toggle on).

Returned as a flat vector so callers can iterate without holding a reference into the hash.

◆ cleanupClosedWindowState()

void PhosphorCompositor::AutotileStateHelpers::cleanupClosedWindowState ( const QString &  windowId,
BorderState border,
AutotileWindowState state 
)
inline

Clean up all state tracking for a closed window.

Removes the window from all QSet/QHash state maps. Does NOT handle D-Bus calls or compositor-specific cleanup.

◆ isTiledWindow()

bool PhosphorCompositor::AutotileStateHelpers::isTiledWindow ( const BorderState border,
const QString &  windowId 
)
inline

◆ removeFromAllScreens()

bool PhosphorCompositor::AutotileStateHelpers::removeFromAllScreens ( BorderState border,
const QString &  windowId 
)
inline

Remove a window from every screen's tiled bucket.

Returns true if any bucket contained it.

◆ removeFromOtherScreens()

void PhosphorCompositor::AutotileStateHelpers::removeFromOtherScreens ( BorderState border,
const QString &  windowId,
const QString &  keepScreenId 
)
inline

Remove a window from every screen's tiled bucket EXCEPT keepScreenId (cross-screen transfer: a window is tile-managed by one screen at a time, so re-recording on a new screen first strips any stale sibling claim).

◆ removeTiledOnScreen()

bool PhosphorCompositor::AutotileStateHelpers::removeTiledOnScreen ( BorderState border,
const QString &  screenId,
const QString &  windowId 
)
inline

Remove a window from a specific screen's tiled bucket.

Returns true if it was present. Erases the bucket if it becomes empty.

◆ shouldShowBorderForWindow()

bool PhosphorCompositor::AutotileStateHelpers::shouldShowBorderForWindow ( const BorderState border,
const QString &  windowId 
)
inline

◆ tiledOnScreen()

QSet< QString > PhosphorCompositor::AutotileStateHelpers::tiledOnScreen ( const BorderState border,
const QString &  screenId 
)
inline

Detached copy of the set of tiled windows on a given screen (QHash::value copy, not a reference).

Empty if none.