6#include <QHashFunctions>
7#include <QLatin1StringView>
277 if (
activity.isEmpty() || other.isEmpty()) {
302 QList<std::pair<QString, PlacementStateKey>>
released;
304 QList<std::pair<QString, PlacementStateKey>>
adopted;
Definition DesktopRemap.h:12
StickyWindowHandling
Definition EngineTypes.h:238
@ IgnoreAll
Definition EngineTypes.h:241
@ TreatAsNormal
Definition EngineTypes.h:239
@ RestoreOnly
Definition EngineTypes.h:240
PlacementStateKey TilingStateKey
Backwards-compatible spelling for autotile's existing sources.
Definition EngineTypes.h:60
StickyPinPhase
Which half of the sticky-screen pin pass to run.
Definition EngineTypes.h:323
@ Acquire
Definition EngineTypes.h:324
@ Release
Definition EngineTypes.h:325
RestoreReason clampRestoreReasonFromWire(int wire)
Clamp an integer wire value to a valid RestoreReason.
Definition EngineTypes.h:140
WindowKind clampWindowKindFromWire(int wire)
Clamp an integer wire value to a valid WindowKind.
Definition EngineTypes.h:89
SnapIntent
Definition EngineTypes.h:62
@ UserInitiated
Definition EngineTypes.h:63
@ AutoReplaced
The same automatic placement for a window that did NOT just open (a restart or pending sweep,...
Definition EngineTypes.h:70
@ AutoRestored
An automatic placement of a window that genuinely opened: may take focus under "Focus new windows".
Definition EngineTypes.h:66
RestoreReason
Why a snap restore is being resolved.
Definition EngineTypes.h:119
@ DesktopArrival
re-drive after the daemon moved the window to another desktop
Definition EngineTypes.h:123
@ PendingSweep
the pending-restores sweep, once the daemon is ready
Definition EngineTypes.h:122
@ DesktopReapply
re-apply the zone a window already holds in the context it arrived in; places nothing new
Definition EngineTypes.h:127
@ Open
a window OPEN: session restore, deferred-routing flush
Definition EngineTypes.h:120
@ DaemonRestartSweep
the bring-up stacking-restore sweep
Definition EngineTypes.h:124
@ Unminimize
unminimize of a window orphaned by a daemon restart
Definition EngineTypes.h:121
constexpr QLatin1StringView RestoreSentinel("__restore__")
WindowKind
Coarse structural classification of a window, carried on the open and close wire calls and on the pla...
Definition EngineTypes.h:77
@ Unknown
Definition EngineTypes.h:78
@ Normal
Definition EngineTypes.h:79
@ Transient
Definition EngineTypes.h:80
size_t qHash(const PlacementStateKey &key, size_t seed=0)
Definition EngineTypes.h:36
std::function< bool(const QString &)> StickyPredicate
Answers whether a window is on all desktops.
Definition EngineTypes.h:247
std::function< DesktopSpan(const QString &)> DesktopSpanQuery
Answers a window's DesktopSpan.
Definition EngineTypes.h:292
The contexts a window occupies, as the per-desktop membership pass reads them: which desktops (x11 nu...
Definition EngineTypes.h:258
QSet< int > desktops
when !sticky: the desktops it occupies (a span such as {1,2})
Definition EngineTypes.h:261
bool sticky
on every desktop
Definition EngineTypes.h:260
bool coversKey(const PlacementStateKey &key) const
Whether the span reaches the context key names.
Definition EngineTypes.h:283
QStringList activities
When the window is on several (but not all) activities, all of them; empty otherwise.
Definition EngineTypes.h:265
bool coversDesktop(int desktop) const
Whether the span reaches desktop desktop.
Definition EngineTypes.h:268
bool coversActivity(const QString &other) const
Whether the span reaches activity other.
Definition EngineTypes.h:275
bool known
false: no desktop information yet — leave memberships alone
Definition EngineTypes.h:259
QString activity
empty: every activity, or unknown
Definition EngineTypes.h:262
What a membership pass did, so the caller can drive the bookkeeping the engines cannot reach: the pla...
Definition EngineTypes.h:299
QList< std::pair< QString, PlacementStateKey > > adopted
(windowId, key) memberships granted.
Definition EngineTypes.h:304
QList< std::pair< QString, PlacementStateKey > > released
(windowId, key) memberships taken back because the span stopped covering them.
Definition EngineTypes.h:302
bool isEmpty() const
Definition EngineTypes.h:306
Identity of a per-screen placement state: a window's placement is scoped to the (screen,...
Definition EngineTypes.h:25
bool operator==(const PlacementStateKey &other) const
Definition EngineTypes.h:30
int desktop
Definition EngineTypes.h:27
QString screenId
Definition EngineTypes.h:26
QString activity
Definition EngineTypes.h:28
Definition EngineTypes.h:159
int virtualDesktop
Definition EngineTypes.h:163
QString windowId
Definition EngineTypes.h:160
QStringList zoneIds
Every zone the window held, primary first.
Definition EngineTypes.h:172
QString screenId
Definition EngineTypes.h:162
bool fromRemovedLayout
The entry holds a zone of a layout being deleted (bufferWindowsOfRemovedLayout).
Definition EngineTypes.h:167
int zonePosition
Definition EngineTypes.h:161
Definition EngineTypes.h:176
static SnapResult noSnap()
Definition EngineTypes.h:200
bool shouldSnap
Definition EngineTypes.h:177
QString zoneId
Definition EngineTypes.h:179
QStringList zoneIds
Definition EngineTypes.h:180
QRect geometry
Definition EngineTypes.h:178
bool deferredToTilingEngine
INERT, kept for ABI layout: snap's resolve once set it when it stood down for a record that homed the...
Definition EngineTypes.h:187
QString screenId
Definition EngineTypes.h:181
int virtualDesktop
Target virtual desktop the snap should be committed in (1-based).
Definition EngineTypes.h:193
bool isValid() const
Definition EngineTypes.h:195
Definition EngineTypes.h:210
QStringList zoneIds
Definition EngineTypes.h:212
QRect geometry
Definition EngineTypes.h:213
QString screenId
Definition EngineTypes.h:214
bool found
Definition EngineTypes.h:211
Definition EngineTypes.h:218
QString windowId
Definition EngineTypes.h:219
QRect targetGeometry
Definition EngineTypes.h:223
QString targetScreenId
Definition EngineTypes.h:224
QStringList targetZoneIds
Definition EngineTypes.h:222
bool restatement
The entry re-states a placement the window already has (a carry to the desktop it moved to,...
Definition EngineTypes.h:235
QString targetZoneId
Definition EngineTypes.h:221
QString sourceZoneId
Definition EngineTypes.h:220
int virtualDesktop
Virtual desktop to record the assignment on (1-based).
Definition EngineTypes.h:230
size_t operator()(const PhosphorEngine::PlacementStateKey &key) const noexcept
Definition EngineTypes.h:49