Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorProtocol::TileRequestEntry Struct Reference

D-Bus struct for the shared tiling-family tile requests (autotile + scrolling ride the same windowsTileRequested pipeline): (siiiissbbbssiiibsb) More...

#include <phosphor-protocol/include/PhosphorProtocol/AutotileTypes.h>

Public Member Functions

QRect toRect () const
 
QString validationError () const
 Returns empty QString if valid, or a human-readable description of the invariant violation.
 

Public Attributes

QString windowId
 
int x = 0
 
int y = 0
 
int width = 0
 
int height = 0
 
QString zoneId
 Reserved and currently always empty on this wire: no producer writes it and no consumer reads it (it predates the autotile-to-tiling generalization).
 
QString screenId
 
bool monocle = false
 
bool floating = false
 
bool windowedFullscreen = false
 Scrolling mode: windowed fullscreen (niri toggle-windowed-fullscreen).
 
QString stacking
 Overlap-layout stacking direction: "firstOnTop" or "lastOnTop".
 
QString scrollEdge
 Scrolling mode: which screen edge this window's motion is anchored to.
 
int viewDelta = 0
 Scrolling mode: how far the whole VIEW slid since the last batch, in logical pixels, for the screen this entry belongs to.
 
int visualX = 0
 Scrolling strip: where this window really sits on the strip, when that differs from the rect committed above.
 
int visualY = 0
 
bool hasVisualPos = false
 
QString tabFrom
 Scrolling mode: the window id of the tab this one is REPLACING in a tabbed column, when this entry is a tab being activated.
 
bool viewImmediate = false
 Scrolling mode: this batch's view travel is USER-DRIVEN continuous motion (the drag edge auto-scroll heartbeat, ~60 Hz), not a discrete scroll verb.
 

Detailed Description

D-Bus struct for the shared tiling-family tile requests (autotile + scrolling ride the same windowsTileRequested pipeline): (siiiissbbbssiiibsb)

Member Function Documentation

◆ toRect()

QRect PhosphorProtocol::TileRequestEntry::toRect ( ) const
inline

◆ validationError()

QString PhosphorProtocol::TileRequestEntry::validationError ( ) const

Returns empty QString if valid, or a human-readable description of the invariant violation.

Call at every unmarshal site for THIS type to detect a garbled payload before acting on it.

Not every wire type in this header has one — AlgorithmInfoEntry and PreTileGeometryEntry are unmarshalled unvalidated. That is a gap rather than a policy: the types that carry a validator are the ones whose garbled values were seen to do damage.

Member Data Documentation

◆ floating

bool PhosphorProtocol::TileRequestEntry::floating = false

◆ hasVisualPos

bool PhosphorProtocol::TileRequestEntry::hasVisualPos = false

◆ height

int PhosphorProtocol::TileRequestEntry::height = 0

◆ monocle

bool PhosphorProtocol::TileRequestEntry::monocle = false

◆ screenId

QString PhosphorProtocol::TileRequestEntry::screenId

◆ scrollEdge

QString PhosphorProtocol::TileRequestEntry::scrollEdge

Scrolling mode: which screen edge this window's motion is anchored to.

One of "left", "right", "top" or "bottom"; empty for every other placement. Which PAIR is in play follows the screen's strip axis — a horizontal strip uses left/right, a vertical one top/bottom. The validator in types.cpp is the authority on the accepted set.

This exists because a scrolling strip's off-viewport columns have to be committed somewhere, and where they are committed must NOT decide which way they appear to move. Parking a column just past the edge it left by encodes the direction in the position, which forces a choice between a believable animation and keeping the rect off a neighbouring output — on a horizontally-adjacent monitor pair those two demands are in direct conflict and the position can only satisfy one. Carrying the edge as data lets the engine park wherever is safe while the effect still animates from the side the user scrolled from.

◆ stacking

QString PhosphorProtocol::TileRequestEntry::stacking

Overlap-layout stacking direction: "firstOnTop" or "lastOnTop".

Empty for non-overlap layouts (the effect leaves z-order alone).

◆ tabFrom

QString PhosphorProtocol::TileRequestEntry::tabFrom

Scrolling mode: the window id of the tab this one is REPLACING in a tabbed column, when this entry is a tab being activated.

Empty for every other placement.

A tab switch is two commits sharing one rect — the outgoing tab parks, the incoming tab takes the rect it just vacated — and the pair is not recoverable from the rects alone: both are ordinary placements, and matching them by coincident geometry would also fire on a column that merely re-laid out. Only the engine knows the two entries are the same swap, so it says so, and the compositor cross-fades the outgoing tab's content into the incoming one instead of hard-cutting between two different windows in the same rectangle.

Named on the ARRIVING entry: that is the window still on screen when the animation runs, and the one the transition is installed on.

◆ viewDelta

int PhosphorProtocol::TileRequestEntry::viewDelta = 0

Scrolling mode: how far the whole VIEW slid since the last batch, in logical pixels, for the screen this entry belongs to.

Zero for every other placement, and zero within scrolling for a window the view does not carry.

SIGNED SCALAR ALONG THE SCREEN'S OWN STRIP AXIS, not along x. A strip only ever slides one way at a time, so the type says so: an x/y pair would make a both-non-zero state representable that no producer can mean and every consumer would have to decide about, and it would fork the single clamp budget the effect leans on into two components that jointly admit sqrt(2) times it. Which axis this is measured along is a property of the SCREEN, published separately, because the paint path and the tab-indicator surface need it at moments when no batch is in hand.

It is a property of the batch rather than of the window, carried per-entry so a batch spanning several screens stays unambiguous. The effect springs it ONCE per output and lets every carrying window ride it, which is what makes the strip move as one object instead of as N windows that each started their own spring a moment apart.

Zero means "not carried". A parked column is the case that matters: its committed rect is off below the union of all outputs, so no translation puts it back on screen, and it keeps the edge-anchored slide-out built from scrollEdge instead.

◆ viewImmediate

bool PhosphorProtocol::TileRequestEntry::viewImmediate = false

Scrolling mode: this batch's view travel is USER-DRIVEN continuous motion (the drag edge auto-scroll heartbeat, ~60 Hz), not a discrete scroll verb.

The effect must apply viewDelta directly — no view animation leg, no strip shader pass — because the per-tick commits ARE the motion. Animating on top retargets a leg every 16 ms, which on a stateless (duration) curve resets its clock and zeroes its velocity each tick, so the painted strip stalls behind the committed geometry and then glides once when the ticks stop. Meaningless without a non-zero viewDelta; false for every discrete scroll. Trailing, so aggregate-initialized fixtures stay aligned.

◆ visualX

int PhosphorProtocol::TileRequestEntry::visualX = 0

Scrolling strip: where this window really sits on the strip, when that differs from the rect committed above.

Only a PARKED column sets it.

A parked column is committed below the union of all outputs, because a rect is the only clip every present path honours and an off-view column must not land on a neighbouring monitor. But the park is not where the column IS on the strip, and while the view slides the column has to be SEEN travelling past — otherwise the columns whizzing by during a fast scroll are exactly the ones that have parked, and the screen goes empty instead of showing the strip move.

So the two answers are separated: the rect above stays the safe commit, and this is the position to paint at. The compositor translates by the difference and then adds the view offset on top, which puts the column back in lockstep with the rest of the strip.

hasVisualPos rather than a zero sentinel: (0, 0) is a legal position on a strip whose screen starts at the origin.

◆ visualY

int PhosphorProtocol::TileRequestEntry::visualY = 0

◆ width

int PhosphorProtocol::TileRequestEntry::width = 0

◆ windowedFullscreen

bool PhosphorProtocol::TileRequestEntry::windowedFullscreen = false

Scrolling mode: windowed fullscreen (niri toggle-windowed-fullscreen).

The effect tells the client it is fullscreen (KWin fullscreen state) while committing the column rect above — the tile never leaves its slot. False for every other placement.

◆ windowId

QString PhosphorProtocol::TileRequestEntry::windowId

◆ x

int PhosphorProtocol::TileRequestEntry::x = 0

◆ y

int PhosphorProtocol::TileRequestEntry::y = 0

◆ zoneId

QString PhosphorProtocol::TileRequestEntry::zoneId

Reserved and currently always empty on this wire: no producer writes it and no consumer reads it (it predates the autotile-to-tiling generalization).

Kept because removing a mid-struct field is another wire break for zero functional gain.


The documentation for this struct was generated from the following file: