Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorEngine::IPlacementEngine::HandoffContext Struct Reference

Context for a cross-engine window handoff. More...

#include <phosphor-engine/include/PhosphorEngine/IPlacementEngine.h>

Public Attributes

QString windowId
 
QString fromEngineId
 source engine identity ("snap" / "autotile" / "scrolling" / "")
 
QString toScreenId
 destination screen (must be owned by to engine)
 
int toDesktop = 0
 destination virtual desktop (1-based); 0 = current desktop (drag-drop / same-desktop monitor crossing).
 
QPoint dropPos
 cursor position at drop, or invalid for non-drag handoffs
 
QRect sourceGeometry
 window's frame at handoff time (for size preservation)
 
QSize minSize
 minimum size as the SOURCE engine models it (0x0 when unknown) — autotile stores it screen-capped, scrolling raw, so treat it as a hint, not the client's exact value.
 
QStringList sourceZoneIds
 zones the window held at source (empty if not snapped)
 
bool wasFloating = false
 window was floating in source engine
 
bool heldFocus = false
 the window held compositor focus at handoff time, per the daemon's windowActivated tracking.
 
int insertIndex = -1
 PER-TARGET unit.
 

Detailed Description

Context for a cross-engine window handoff.

Populated by the daemon from the source engine's state and the drop event before invoking handoffReceive on the destination engine.

Member Data Documentation

◆ dropPos

QPoint PhosphorEngine::IPlacementEngine::HandoffContext::dropPos

cursor position at drop, or invalid for non-drag handoffs

◆ fromEngineId

QString PhosphorEngine::IPlacementEngine::HandoffContext::fromEngineId

source engine identity ("snap" / "autotile" / "scrolling" / "")

◆ heldFocus

bool PhosphorEngine::IPlacementEngine::HandoffContext::heldFocus = false

the window held compositor focus at handoff time, per the daemon's windowActivated tracking.

Receivers seed their focus-side memory from it: a focused window KEEPS focus across the handoff, so no focusChanged report ever arrives to record the side change.

◆ insertIndex

int PhosphorEngine::IPlacementEngine::HandoffContext::insertIndex = -1

PER-TARGET unit.

Autotile target: raw window-order index (position in windowOrder(), counting floats — NOT the tiled-only index). Scrolling target: COLUMN index (0 = first column; -1 appends at the strip's right end). Used by cross-mode SWAP (partner's exact slot) and by edge-aware cross-mode MOVE entry. Ignored by snap targets.

◆ minSize

QSize PhosphorEngine::IPlacementEngine::HandoffContext::minSize

minimum size as the SOURCE engine models it (0x0 when unknown) — autotile stores it screen-capped, scrolling raw, so treat it as a hint, not the client's exact value.

The compositor only re-reports a min size when it changes or a retile discovers a refusal, so the receiver seeds its own min-size model from this instead of waiting a refuse/re-discover round-trip. Callers must query the source BEFORE handoffRelease drops its tracking.

◆ sourceGeometry

QRect PhosphorEngine::IPlacementEngine::HandoffContext::sourceGeometry

window's frame at handoff time (for size preservation)

◆ sourceZoneIds

QStringList PhosphorEngine::IPlacementEngine::HandoffContext::sourceZoneIds

zones the window held at source (empty if not snapped)

◆ toDesktop

int PhosphorEngine::IPlacementEngine::HandoffContext::toDesktop = 0

destination virtual desktop (1-based); 0 = current desktop (drag-drop / same-desktop monitor crossing).

Set for a cross-VIRTUAL-DESKTOP handoff so the receiver places the window in the target desktop's state/layout, not the currently-visible one.

◆ toScreenId

QString PhosphorEngine::IPlacementEngine::HandoffContext::toScreenId

destination screen (must be owned by to engine)

◆ wasFloating

bool PhosphorEngine::IPlacementEngine::HandoffContext::wasFloating = false

window was floating in source engine

◆ windowId

QString PhosphorEngine::IPlacementEngine::HandoffContext::windowId

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