One window in a column. More...
#include <PhosphorScrollEngine/ScrollTypes.h>
Public Member Functions | |
| int | minMain (StripAxis axis) const |
| The frame minimum along the strip (a column-width floor). | |
| int | minCross (StripAxis axis) const |
| The frame minimum across the strip (a stacked-tile floor). | |
Public Attributes | |
| QString | windowId |
| WindowHeight | height |
| std::optional< WindowHeight > | preMaximizeHeight |
| The height this tile carried when toggleMaximizeActiveWindowHeight last maximized it, so the un-maximize press can put it back instead of falling to Auto. | |
| bool | minimized = false |
| Minimized tiles keep their slot/order but are excluded from layout; unminimize restores the window into the same slot. | |
| bool | windowedFullscreen = false |
| Windowed fullscreen (niri toggle-windowed-fullscreen): the client is told it is fullscreen while the tile keeps its normal column slot. | |
| int | minWidth = 0 |
| The window's minimum FRAME size (0 = unconstrained): the minimum its client declares, converted by the compositor to the frame size it implies on each declaring axis (decorations included), so it compares directly with the frame rects this engine commits. | |
| int | minHeight = 0 |
One window in a column.
|
inline |
The frame minimum across the strip (a stacked-tile floor).
|
inline |
The frame minimum along the strip (a column-width floor).
| WindowHeight PhosphorScrollEngine::Tile::height |
| int PhosphorScrollEngine::Tile::minHeight = 0 |
| bool PhosphorScrollEngine::Tile::minimized = false |
Minimized tiles keep their slot/order but are excluded from layout; unminimize restores the window into the same slot.
| int PhosphorScrollEngine::Tile::minWidth = 0 |
The window's minimum FRAME size (0 = unconstrained): the minimum its client declares, converted by the compositor to the frame size it implies on each declaring axis (decorations included), so it compares directly with the frame rects this engine commits.
Stored PHYSICALLY as the compositor reports it. Relayout clamps the resolved rect to it; a window that cannot honour its slot at all is the engine's cue to float it instead.
Layout wants this by ROLE, so read it through minMain/minCross rather than naming a field: on a vertical strip a window's minimum WIDTH is what constrains the tile ACROSS the strip, and its minimum HEIGHT is what constrains the column ALONG it. Picking by name silently applies each constraint to the wrong axis.
| std::optional<WindowHeight> PhosphorScrollEngine::Tile::preMaximizeHeight |
The height this tile carried when toggleMaximizeActiveWindowHeight last maximized it, so the un-maximize press can put it back instead of falling to Auto.
Empty means "not maximized by that verb", which is also the answer for a tile that reached full height by another route (an adjust clamped at the budget, a preset cycled to the top) — those still un-maximize to Auto, since there is no remembered height to restore and Auto is the height family's "the column decides".
Held HERE rather than as a strip-level index the way the width axis holds m_preMaximizeColumnIdx: an index has to be re-clamped by every insert, removal, reorder, consume and expel (that bookkeeping is why this verb originally shipped without a slot at all), while a field on the tile travels with it through all of those for free, because every one of those paths moves the Tile struct whole.
Set ONLY by that verb's maximize arm. What clears it again divides on who chose the height, not on whether the tile moved.
A height the CALLER names settles it, even when the tile already held that value: setActiveWindowHeight and setWindowHeightIntent both clear above their equality bail, reconcileWindowSize clears before comparing the size a user's interactive resize settled on, resetToDefaults clears as it applies the layout's default, and equalize clears every tile in the column outright. In each of those someone asked for a specific height and got it, so there is no maximize left to undo.
A height the VERB computes does not, unless the write lands. adjust, minimize and expand bail when the press would move no pixels, and the preset cycle bails when the entry it picked is the one the tile already holds; all four clear only past that bail. A refusal is not a countermand — a held-down key sitting at its limit must not erase the memory. Nor does dropping a column's maximize-to-edges override on its own: that press reports a change, but it has not settled a height. Because of that the standing slot is also what the toggle READS to decide the tile is maximized: it cannot go stale the way the height itself does when the budget moves under it. Deliberately NOT serialized and not carried across a re-insert (migration, unfloat, stash restore, drag commit, and the drag CANCEL too, whose Escape is an exact restore of the slot but rebuilds the tile), which is the same session-and-place scope the width axis's slot has — a window that comes back from one of those un-maximizes to Auto.
| bool PhosphorScrollEngine::Tile::windowedFullscreen = false |
Windowed fullscreen (niri toggle-windowed-fullscreen): the client is told it is fullscreen while the tile keeps its normal column slot.
Layout ignores this flag entirely — it only rides the apply payload so the compositor side can flip the client's fullscreen state.
| QString PhosphorScrollEngine::Tile::windowId |