Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
ScrollStashTypes.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
7
10
12
13#include <QElapsedTimer>
14#include <QString>
15#include <QVariant>
16#include <QVector>
17
18namespace PhosphorScrollEngine {
19
26{
27 QString windowId;
39 bool minimized = false;
46 bool windowedFullscreen = false;
76};
77
141
146{
147 QVector<StashedColumn> columns;
158 QElapsedTimer fuzzyClaimWindow;
160 int viewAnchor = 0;
166 bool viewDetached = false;
177 bool viewCarried = false;
237 quint64 sequence = 0;
238
244 bool isEmpty() const
245 {
246 return columns.isEmpty();
247 }
248 int tileCount() const
249 {
250 int total = 0;
251 for (const StashedColumn& c : columns) {
252 total += c.tiles.size();
253 }
254 return total;
255 }
256};
257
368
493
502{
507 int floorPx = 0;
522 int peekPx = 0;
526 bool gaveBack = false;
532 bool pinned = false;
533
534 bool isEmpty() const
535 {
536 return floorPx == 0 && peekPx == 0 && !gaveBack;
537 }
538};
539
548{
554 int floorPx = 0;
566 int mainPx = 0;
570 bool gaveBack = false;
573 bool pinned = false;
574
575 bool isEmpty() const
576 {
577 return floorPx == 0 && !gaveBack;
578 }
579};
580
604
605} // namespace PhosphorScrollEngine
ScrollAxis
Which way a scrolling strip runs on one screen.
Definition ScrollAxisEnum.h:29
@ Horizontal
Definition ScrollAxisEnum.h:30
Definition ScrollEngine.h:46
ColumnDisplay
How a column presents its tiles (niri's column display).
Definition ScrollTypes.h:246
@ Normal
Tiles split the column's CROSS extent between them; all are visible.
Definition ScrollTypes.h:248
Where a drag-insert preview should place the dragged window, in the TARGET ENGINE's slot vocabulary.
Definition IPlacementEngine.h:538
Identity of a per-screen placement state: a window's placement is scoped to the (screen,...
Definition EngineTypes.h:25
Column width INTENT — the source of truth the strip stores.
Definition ScrollTypes.h:528
What a client's own commits have taught the engine about one window's extent ACROSS a strip that runs...
Definition ScrollStashTypes.h:548
bool gaveBack
A shorter answer has given part or all of floorPx back since it was learned, CommittedMainExtent::gav...
Definition ScrollStashTypes.h:570
bool isEmpty() const
Definition ScrollStashTypes.h:575
int mainPx
The tile's offer ALONG the strip when the floor was learned: the floor's premise.
Definition ScrollStashTypes.h:566
int floorPx
The least share of its column across the strip the tile is laid out with, exactly like a declared min...
Definition ScrollStashTypes.h:554
bool pinned
A longer answer re-taught the floor after a give-back, so a shorter answer no longer gives it back (C...
Definition ScrollStashTypes.h:573
One window's CommittedMainExtent per strip orientation, the value type of ScrollEngine::m_committedEx...
Definition ScrollStashTypes.h:587
CommittedCrossExtent verticalCross
Definition ScrollStashTypes.h:597
CommittedMainExtent vertical
Definition ScrollStashTypes.h:589
bool isEmpty() const
Definition ScrollStashTypes.h:599
CommittedMainExtent horizontal
Definition ScrollStashTypes.h:588
CommittedCrossExtent horizontalCross
The cross-axis floors, per strip orientation like the two above and kept apart from them: horizontalC...
Definition ScrollStashTypes.h:596
What a client's own commits have taught the engine about one window's extent ALONG a strip that runs ...
Definition ScrollStashTypes.h:502
bool isEmpty() const
Definition ScrollStashTypes.h:534
bool pinned
A wider answer re-taught the floor after a give-back.
Definition ScrollStashTypes.h:532
int peekPx
The last extent along the strip the client committed to its WHOLE tile when that was not the offer (0...
Definition ScrollStashTypes.h:522
bool gaveBack
A narrower answer has given part or all of floorPx back since it was learned.
Definition ScrollStashTypes.h:526
int floorPx
The extent along the strip the client committed past the tile it was offered, which the column is the...
Definition ScrollStashTypes.h:507
Live drag-insert preview state (drag_preview.cpp).
Definition ScrollStashTypes.h:373
bool priorFloating
Definition ScrollStashTypes.h:460
int autoScrollDirection
Which edge band the cursor is in: -1 towards the strip's start (left on a horizontal strip,...
Definition ScrollStashTypes.h:405
QString targetActiveAtBegin
The window each strip involved called active when the hold began, the target strip's and,...
Definition ScrollStashTypes.h:490
bool priorViewDetachedAtBegin
Definition ScrollStashTypes.h:454
bool defensivelyDetached
Set when begin's defensive block took the window out of the TARGET strip despite it having no reverse...
Definition ScrollStashTypes.h:432
bool contextMoveWarned
One-shot latch for the tick's context-moved diagnostic.
Definition ScrollStashTypes.h:415
QElapsedTimer autoScrollArmed
Elapsed timer since the cursor entered the band, used for the configured start delay.
Definition ScrollStashTypes.h:409
PhosphorEngine::IPlacementEngine::DragInsertTarget lastTarget
The most recent hit-tested drop target, stored verbatim — nothing structural happens until commit app...
Definition ScrollStashTypes.h:381
FloatRestore floatRestoreEntry
Definition ScrollStashTypes.h:466
int targetViewAnchorAtBegin
The TARGET strip's view (anchor + detach latch) as it stood BEFORE begin's detach take and settle cla...
Definition ScrollStashTypes.h:440
QString priorActiveAtBegin
Definition ScrollStashTypes.h:491
bool targetViewDetachedAtBegin
Definition ScrollStashTypes.h:441
bool hadPriorState
Definition ScrollStashTypes.h:455
PhosphorEngine::PlacementStateKey targetKey
The context the preview inserted into, captured at begin so the prune paths can tell whether a dying ...
Definition ScrollStashTypes.h:378
bool hadFloatRestoreEntry
The m_floatRestore entry begin consumed when it silently unfloated the window; re-inserted verbatim o...
Definition ScrollStashTypes.h:465
PhosphorEngine::PlacementStateKey priorKey
Definition ScrollStashTypes.h:456
FloatRestore carried
The window's OWN begin-time width/display/height/min-size intents.
Definition ScrollStashTypes.h:399
QString windowId
Definition ScrollStashTypes.h:374
FloatRestore priorSlot
The tiled slot at begin time (valid when !priorFloating).
Definition ScrollStashTypes.h:462
int priorViewAnchorAtBegin
The PRIOR strip's view for a cross-key drag, captured for the same reason: begin's take shortens that...
Definition ScrollStashTypes.h:453
QString targetScreenId
Definition ScrollStashTypes.h:375
bool viewScrolledDuringHold
True once the edge auto-scroll actually moved the view during this hold.
Definition ScrollStashTypes.h:448
bool priorFloatHadFocus
Whether the floating window held the state's float-focus memory pair (lastFloatingFocus + floatingHas...
Definition ScrollStashTypes.h:476
qreal autoScrollResidue
Sub-pixel remainder carried between ticks.
Definition ScrollStashTypes.h:419
FloatRestore defensiveSlot
Definition ScrollStashTypes.h:433
bool priorSameKey
Whole-key comparison (screen AND desktop AND activity): a same-screen/different-desktop prior context...
Definition ScrollStashTypes.h:459
bool wasScrollFloated
Definition ScrollStashTypes.h:467
QSize clientSize
The size the daemon reported for the dragged window (setDragInsertClientSize), or empty when it repor...
Definition ScrollStashTypes.h:484
bool autoScrollOwnsTarget
True once the delay has elapsed and the scroll owns the drop target.
Definition ScrollStashTypes.h:423
What a floated/minimized window's column held, so unfloat restores the slot AND the user's width/disp...
Definition ScrollStashTypes.h:268
bool windowedFullscreen
Windowed fullscreen, captured by the DRAG paths only (captureDragSlot): an Escape cancel is an exact ...
Definition ScrollStashTypes.h:344
quint64 leaveSequence
When the window left its shared column, from an engine-wide counter (floatWindowInternal stamps it be...
Definition ScrollStashTypes.h:312
int column
Definition ScrollStashTypes.h:269
ColumnDisplay display
Definition ScrollStashTypes.h:271
QString tabbedHeightHeirId
The tab that inherited the extent ownership when this window left a TABBED column it owned (ownedTabb...
Definition ScrollStashTypes.h:365
int tileIndex
The tile slot inside a SHARED column (-1 when the window had its own column).
Definition ScrollStashTypes.h:298
bool fullscreenHold
Taken by the compositor for the window's OWN fullscreen (ScrollEngine::setWindowFullscreenFloat),...
Definition ScrollStashTypes.h:280
bool ownedTabbedHeight
Whether this window was the tab that decided its TABBED column's cross extent when it left.
Definition ScrollStashTypes.h:287
QString stackAnchor
A surviving SIBLING of the shared column, used to re-locate the stack at restore time — the bare colu...
Definition ScrollStashTypes.h:303
WindowHeight tabbedHeightHeirIntent
Definition ScrollStashTypes.h:366
WindowHeight height
The tile's height INTENT at float time.
Definition ScrollStashTypes.h:337
int minHeight
Definition ScrollStashTypes.h:320
bool maximizedToEdges
The source column's maximize-to-edges state when the window left as the column's ONLY tile.
Definition ScrollStashTypes.h:294
ColumnWidth width
Definition ScrollStashTypes.h:270
int minWidth
Minimum frame size (Tile::minWidth) at float time — the tile that held it dies with takeWindow,...
Definition ScrollStashTypes.h:319
Definition ScrollStashTypes.h:79
QString activeWindowId
The column's ACTIVE tile, by window id — for a Tabbed column that is the shown tab.
Definition ScrollStashTypes.h:87
ColumnWidth width
Definition ScrollStashTypes.h:81
bool maximizedToEdges
The column's maximize-to-edges state (Column::maximizedToEdges).
Definition ScrollStashTypes.h:99
bool heightOwnerRestored
Definition ScrollStashTypes.h:121
QVector< StashedTile > tiles
Definition ScrollStashTypes.h:80
bool arrivesAsMove
Recorded by ScrollEngine::stashColumnForDesktopMove for a column moved here from another desktop,...
Definition ScrollStashTypes.h:139
QString heightOwnerId
Which tab owns a TABBED column's cross extent, by window id.
Definition ScrollStashTypes.h:95
bool shownTabRestored
Latched once activeWindowId above has actually been put in force on the live column,...
Definition ScrollStashTypes.h:120
ColumnDisplay display
Definition ScrollStashTypes.h:82
One stashed strip: the structural columns plus the focus/view pair whose loss made every mode round t...
Definition ScrollStashTypes.h:146
int tileCount() const
Definition ScrollStashTypes.h:248
int blueprintCursor
The strip's template blueprint cursor, carried across the round trip.
Definition ScrollStashTypes.h:203
QElapsedTimer fuzzyClaimWindow
Monotonic grace window for the cross-session appId FUZZY claim in restoreFromStripStash.
Definition ScrollStashTypes.h:158
PhosphorProtocol::ScrollAxis axis
The axis this stash was captured under.
Definition ScrollStashTypes.h:186
bool isEmpty() const
STRUCTURALLY empty: no columns to rebuild.
Definition ScrollStashTypes.h:244
bool viewDetached
Whether that anchor was an explicit pan rather than a policy-derived view (ScrollStrip's View detachm...
Definition ScrollStashTypes.h:166
bool viewCarried
Whether viewAnchor and viewDetached above carry a view at all.
Definition ScrollStashTypes.h:177
int viewAnchor
Definition ScrollStashTypes.h:160
QVariant blueprintIdentity
The blueprint the cursor above was counting against, so the far side can tell a resumed template from...
Definition ScrollStashTypes.h:226
QString focusedWindowId
Definition ScrollStashTypes.h:159
QVector< StashedColumn > columns
Definition ScrollStashTypes.h:147
quint64 sequence
Monotonic stamp of when this entry was staged (mode exit or persistence load), from m_stashSequence.
Definition ScrollStashTypes.h:237
The mode-round-trip strip stash value types (ScrollEngine::m_stripStash).
Definition ScrollStashTypes.h:26
bool stagedFromPersistence
True while THIS tile was staged from the persisted blob and has not been claimed.
Definition ScrollStashTypes.h:65
bool minimized
Carried for serialization fidelity only — the restore paths do not re-apply it (the effect re-reports...
Definition ScrollStashTypes.h:39
int unclaimedSessions
Consecutive logins THIS tile was staged without ever being claimed.
Definition ScrollStashTypes.h:75
WindowHeight height
Definition ScrollStashTypes.h:28
bool windowedFullscreen
Windowed fullscreen, carried through stash/serialize and RE-APPLIED on exact-id claims only (unlike m...
Definition ScrollStashTypes.h:46
QString windowId
Definition ScrollStashTypes.h:27
Tile height INTENT within a column (its extent ACROSS the strip).
Definition ScrollTypes.h:596