Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
WindowPlacement.h File Reference
#include <PhosphorEngine/EngineTypes.h>
#include <QHash>
#include <QJsonArray>
#include <QJsonObject>
#include <QLatin1String>
#include <QRect>
#include <QString>
#include <QStringList>
#include <utility>

Go to the source code of this file.

Classes

struct  PhosphorEngine::EngineSlot
 One engine's view of a window: which managed slot it occupies (or that it is floating / unmanaged) in THAT engine's mode. More...
 
struct  PhosphorEngine::WindowPlacement
 One window's single, authoritative placement record — the unit of the unified, engine-agnostic restore model. More...
 

Namespaces

namespace  PhosphorEngine
 

Functions

bool PhosphorEngine::hasStableAppIdFor (const QString &appId, const QString &windowId)
 Shared cross-engine ownership predicate over a placement record: does this record carry engineId's slot in its MANAGED state (managedState — snap "snapped", autotile/scrolling "tiled") with a RECORDED screen that is a DIFFERENT screen than the opening one, itself currently in that engine's mode, resolved in the RECORD'S OWN (desktop, activity) context? A same-screen record (or one with no screen of its own) is never "cross-screen": the window is already where its managed slot lives, so the engine owning the OPENING context claims it and the slot merely lies dormant.
 
bool PhosphorEngine::recordContextMatchesLive (const WindowPlacement &p, int liveDesktop, const QString &liveActivity)
 Whether a record's own (desktop, activity) context is compatible with the live context an engine would INSERT it into — the guard a cross-screen claim needs because the reclaim VERDICT is granted on the record's context while the adoption keys the window by the home screen's CURRENT context.
 
template<typename IsEngineMode >
bool PhosphorEngine::pendingCrossScreenManagedRestore (const WindowPlacement &p, QLatin1String engineId, QLatin1String managedState, const QString &openingScreenId, IsEngineMode &&isEngineMode)
 
template<typename IsSnappingMode >
bool PhosphorEngine::pendingCrossScreenSnapRestore (const WindowPlacement &p, const QString &openingScreenId, IsSnappingMode &&isSnappingMode)
 The snap-engine specialization of pendingCrossScreenManagedRestore — the original three-way gate (SnapEngine claims, AutotileEngine and ScrollEngine defer).