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

Where a drag-insert preview should place the dragged window, in the TARGET ENGINE's slot vocabulary. More...

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

Public Member Functions

bool isValid () const
 
bool operator== (const DragInsertTarget &other) const =default
 

Public Attributes

int primary = -1
 
int secondary = -1
 
bool newSlot = false
 
bool leadingEdge = false
 

Detailed Description

Where a drag-insert preview should place the dragged window, in the TARGET ENGINE's slot vocabulary.

A flat int cannot address the strip's two-axis drop space ("column 3, tile 1" vs "a new column between 2 and 3"), so the drag-insert verbs speak this struct; each engine documents its own field meaning.

  • Autotile: primary is the TILED-ONLY insert index (the unit updateDragInsertPreview clamps against tiledWindowCount — NOT the raw window-order index HandoffContext::insertIndex carries). secondary and newSlot are unused.
  • Scrolling: primary is the COLUMN index. With newSlot true the drop opens a NEW column at primary (existing columns from primary shift right); otherwise the window joins the column at primary as a tile at secondary (clamped into the stack; -1 appends at the bottom). leadingEdge marks a new-column target aimed from BEYOND the view's leading edge (left of everything visible, or the first visible column's outer band): the drop is identical, but the indicator renders it as a past-the-edge hint instead of a full rect over the first visible column. Purely a presentation tag — commit ignores it, autotile never sets it.

Member Function Documentation

◆ isValid()

bool PhosphorEngine::IPlacementEngine::DragInsertTarget::isValid ( ) const
inline

◆ operator==()

bool PhosphorEngine::IPlacementEngine::DragInsertTarget::operator== ( const DragInsertTarget other) const
default

Member Data Documentation

◆ leadingEdge

bool PhosphorEngine::IPlacementEngine::DragInsertTarget::leadingEdge = false

◆ newSlot

bool PhosphorEngine::IPlacementEngine::DragInsertTarget::newSlot = false

◆ primary

int PhosphorEngine::IPlacementEngine::DragInsertTarget::primary = -1

◆ secondary

int PhosphorEngine::IPlacementEngine::DragInsertTarget::secondary = -1

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