Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorCompositor::SnapAssistFilter Namespace Reference

Compositor-agnostic snap assist candidate builder. More...

Functions

PHOSPHORCOMPOSITOR_EXPORT PhosphorProtocol::SnapAssistCandidateList buildCandidates (ICompositorBridge *bridge, const QString &excludeWindowId, const QString &screenId, const QSet< QString > &snappedWindowIds)
 Build snap assist candidate list from all visible windows.
 

Detailed Description

Compositor-agnostic snap assist candidate builder.

Filters windows through the ICompositorBridge interface to build the candidate JSON array for the snap assist overlay.

Function Documentation

◆ buildCandidates()

PHOSPHORCOMPOSITOR_EXPORT PhosphorProtocol::SnapAssistCandidateList PhosphorCompositor::SnapAssistFilter::buildCandidates ( ICompositorBridge bridge,
const QString &  excludeWindowId,
const QString &  screenId,
const QSet< QString > &  snappedWindowIds 
)

Build snap assist candidate list from all visible windows.

Filters out: minimized, wrong desktop/activity, excluded by shouldHandle, already snapped (by exact ID or appId with single instance), wrong physical monitor.

Parameters
bridgeCompositor bridge for window access
excludeWindowIdWindow to exclude (the one that was just snapped)
screenIdOnly include windows on the same physical monitor as this ID (empty = all). Sibling virtual screens of the same physical monitor are accepted — matched via PhosphorIdentity::VirtualScreenId::samePhysical.
snappedWindowIdsSet of window IDs that are already snapped
Returns
Typed list of candidates (windowId, icon, caption; compositorHandle left empty — compositor fills it)