Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
AutotileState.h File Reference
#include <QColor>
#include <QHash>
#include <QPair>
#include <QRect>
#include <QRectF>
#include <QSet>
#include <QString>
#include <QVector>
#include <optional>

Go to the source code of this file.

Classes

struct  PhosphorCompositor::BorderState
 Compositor-agnostic autotile border state. More...
 
struct  PhosphorCompositor::AutotileStateHelpers::AutotileWindowState
 Bundles per-window state maps for cleanup operations. More...
 

Namespaces

namespace  PhosphorCompositor
 
namespace  PhosphorCompositor::AutotileStateHelpers
 Compositor-agnostic autotile state accessors and pure helpers.
 

Functions

QString PhosphorCompositor::AutotileStateHelpers::findSavedGeometryKey (const QHash< QString, QRectF > &savedGeometries, const QString &windowId)
 Find key in saved geometries map for a window (exact match only)
 
bool PhosphorCompositor::AutotileStateHelpers::hasSavedGeometryForWindow (const QHash< QString, QRectF > &savedGeometries, const QString &windowId)
 Check if we already have saved geometry for this window.
 
bool PhosphorCompositor::AutotileStateHelpers::isBorderlessWindow (const BorderState &border, const QString &windowId)
 
bool PhosphorCompositor::AutotileStateHelpers::isTiledWindow (const BorderState &border, const QString &windowId)
 
bool PhosphorCompositor::AutotileStateHelpers::shouldShowBorderForWindow (const BorderState &border, const QString &windowId)
 
bool PhosphorCompositor::AutotileStateHelpers::shouldApplyBorderInset (const BorderState &border, const QString &windowId)
 
std::optional< QRect > PhosphorCompositor::AutotileStateHelpers::borderZoneGeometry (const BorderState &border, const QString &windowId)
 
QVector< QRect > PhosphorCompositor::AutotileStateHelpers::allBorderZoneGeometries (const BorderState &border)
 
QRect PhosphorCompositor::AutotileStateHelpers::applyBorderInset (const QRect &geo, int borderWidth)
 Apply border inset to a geometry (shrink by border width on all sides)
 
bool PhosphorCompositor::AutotileStateHelpers::shouldInsetForBorder (const BorderState &border, const QString &windowId, const QRect &geo)
 Check if border inset should be applied for a window's geometry.
 
void PhosphorCompositor::AutotileStateHelpers::cleanupClosedWindowState (const QString &windowId, const QString &screenId, BorderState &border, AutotileWindowState &state)
 Clean up all state tracking for a closed window.
 
void PhosphorCompositor::AutotileStateHelpers::addBorderlessOnScreen (BorderState &border, const QString &screenId, const QString &windowId)
 Add a window to a screen's borderless bucket. Idempotent.
 
void PhosphorCompositor::AutotileStateHelpers::addTiledOnScreen (BorderState &border, const QString &screenId, const QString &windowId)
 Add a window to a screen's tiled bucket. Idempotent.
 
bool PhosphorCompositor::AutotileStateHelpers::removeBorderlessOnScreen (BorderState &border, const QString &screenId, const QString &windowId)
 Remove a window from a specific screen's borderless bucket.
 
bool PhosphorCompositor::AutotileStateHelpers::removeTiledOnScreen (BorderState &border, const QString &screenId, const QString &windowId)
 Remove a window from a specific screen's tiled bucket.
 
bool PhosphorCompositor::AutotileStateHelpers::removeFromAllScreens (BorderState &border, const QString &windowId)
 Remove a window from all screen buckets (both borderless and tiled).
 
QSet< QString > PhosphorCompositor::AutotileStateHelpers::tiledOnScreen (const BorderState &border, const QString &screenId)
 Read-only view of the set of tiled windows on a given screen. Empty if none.
 
QSet< QString > PhosphorCompositor::AutotileStateHelpers::borderlessOnScreen (const BorderState &border, const QString &screenId)
 Read-only view of the set of borderless windows on a given screen. Empty if none.
 
QVector< QPair< QString, QString > > PhosphorCompositor::AutotileStateHelpers::allBorderlessPairs (const BorderState &border)
 Collect every borderless (windowId, screenId) pair for bulk operations (feature disable, hide-titlebars toggle off).
 
QVector< QPair< QString, QString > > PhosphorCompositor::AutotileStateHelpers::allTiledPairs (const BorderState &border)
 Same for tiled. Used by updateHideTitleBarsSetting's toggle-on path.