One stashed strip: the structural columns plus the focus/view pair whose loss made every mode round trip re-anchor on an arbitrary window (first arrival won the focus). More...
#include <PhosphorScrollEngine/ScrollStashTypes.h>
Public Member Functions | |
| bool | isEmpty () const |
| STRUCTURALLY empty: no columns to rebuild. | |
| int | tileCount () const |
Public Attributes | |
| QVector< StashedColumn > | columns |
| QElapsedTimer | fuzzyClaimWindow |
| Monotonic grace window for the cross-session appId FUZZY claim in restoreFromStripStash. | |
| QString | focusedWindowId |
| int | viewAnchor = 0 |
| bool | viewDetached = false |
| Whether that anchor was an explicit pan rather than a policy-derived view (ScrollStrip's View detachment section). | |
| bool | viewCarried = false |
| Whether viewAnchor and viewDetached above carry a view at all. | |
| PhosphorProtocol::ScrollAxis | axis = PhosphorProtocol::ScrollAxis::Horizontal |
| The axis this stash was captured under. | |
| int | blueprintCursor = 0 |
| The strip's template blueprint cursor, carried across the round trip. | |
| QVariant | blueprintIdentity |
| The blueprint the cursor above was counting against, so the far side can tell a resumed template from a swapped one. | |
| quint64 | sequence = 0 |
| Monotonic stamp of when this entry was staged (mode exit or persistence load), from m_stashSequence. | |
One stashed strip: the structural columns plus the focus/view pair whose loss made every mode round trip re-anchor on an arbitrary window (first arrival won the focus).
|
inline |
STRUCTURALLY empty: no columns to rebuild.
Deliberately says nothing about blueprintCursor, because both callers ask this to decide whether there is structure worth restoring or writing out — a cursor-only entry answers true here and is kept alive by the explicit cursor tests at those sites instead.
|
inline |
| PhosphorProtocol::ScrollAxis PhosphorScrollEngine::StashedStrip::axis = PhosphorProtocol::ScrollAxis::Horizontal |
The axis this stash was captured under.
The stash is a THIRD carrier of axis-dependent state, alongside the live strip and the persisted blob, and the easiest of the three to forget: a scrolling -> snap -> scrolling round trip that spans a flip replays whatever was captured. The anchor is the piece that matters — it is main-axis pixels, so replaying one captured on the other axis scrolls the restored strip to a nonsense position.
| int PhosphorScrollEngine::StashedStrip::blueprintCursor = 0 |
The strip's template blueprint cursor, carried across the round trip.
Restoring the columns re-inserts them through paths that consume no blueprint entry, so the far side would otherwise recover spent-ness only as far as the qMax(cursor, columnCount) floor reaches — which is the LIVE column count. A strip that had opened four columns and closed two came back believing it had spent two, and handed entries 2 and 3 out for a second time. Travelling with the structure is what makes the round trip lossless, exactly as focusedWindowId and viewAnchor do for focus and view.
Carried even by an entry with NO columns. A strip whose windows were all floated or minimized away resolves to nothing structural while still standing for the entries it spent, so the cursor is the whole payload of such an entry — see stashStripStructure, which stores one for that case alone.
| QVariant PhosphorScrollEngine::StashedStrip::blueprintIdentity |
The blueprint the cursor above was counting against, so the far side can tell a resumed template from a swapped one.
Rides beside the cursor because the two are only meaningful together: a cursor restored without the blueprint that produced it leaves the consumption site unable to distinguish "same template, resume" from "new template, restart", and it guessed restart — discarding the cursor this entry just carried.
NULL means "this entry hands no identity over", and the restore skips the stamp rather than establishing a null one. Two entries hold null: a context that genuinely has no template, and one staged from the persisted blob (see below). Both want the same treatment — let the consumption site stamp whatever blueprint is in force and keep the cursor — which is why the restore tests isValid() instead of leaning on ScrollState's established flag alone.
NOT serialized, deliberately, unlike the cursor. A restored blob's state has no established identity either, so the consumption site stamps whatever blueprint is in force and keeps the cursor — the same answer persisting the value would produce, without a second staleness class in the blob.
| QVector<StashedColumn> PhosphorScrollEngine::StashedStrip::columns |
| QString PhosphorScrollEngine::StashedStrip::focusedWindowId |
| QElapsedTimer PhosphorScrollEngine::StashedStrip::fuzzyClaimWindow |
Monotonic grace window for the cross-session appId FUZZY claim in restoreFromStripStash.
Started when the entry is staged from persistence and re-started whenever the entry's screen (re-)enters the scrolling set — the two moments an arrival wave of re-announced windows legitimately follows. While invalid or expired, only exact-id claims match, so a genuinely NEW same-app window the user opens minutes later is inserted through the ordinary open path (focused, on view) instead of silently adopting a dead sibling's stashed slot off-screen. Exact-id claims are exempt: an id match IS the evidence the fuzzy path lacks.
| quint64 PhosphorScrollEngine::StashedStrip::sequence = 0 |
Monotonic stamp of when this entry was staged (mode exit or persistence load), from m_stashSequence.
serializeStripState resolves a window listed by two DIFFERENT stash keys in favour of the higher stamp, because the reader's alphabetical first-wins would otherwise let a window's older screen displace its newer one. This orders the stash entries against each other only. A stash and a LIVE strip CAN share a key (an entry still waiting on a window that has not re-announced, beside the strip the others rebuilt), which serializeStripState resolves by merging rather than by stamp.
| int PhosphorScrollEngine::StashedStrip::viewAnchor = 0 |
| bool PhosphorScrollEngine::StashedStrip::viewCarried = false |
Whether viewAnchor and viewDetached above carry a view at all.
A capture of a live strip does (ScrollEngine::buildStashFromState), and so does an entry staged from a blob that wrote the anchor. An entry that hands over its focus without a view does not: a strip moved to a monitor whose work area has another main-axis length (ScrollEngine::stashStripForOutputMove), whose anchor names another view there. Without it the restore applies the focus alone and the centering policy places the view, as for an axis flip. A zero anchor is a real view (the focused column at the leading edge), so the anchor cannot say this itself.
| bool PhosphorScrollEngine::StashedStrip::viewDetached = false |
Whether that anchor was an explicit pan rather than a policy-derived view (ScrollStrip's View detachment section).
Travels with the anchor because restoring one without the other is worse than restoring neither: the position lands, the policy immediately reclaims it, and the view jumps on the first layout pass after the restore.