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

Classes

class  ShellHost
 
class  ShellState
 
struct  SlotEntry
 

Functions

PHOSPHOROVERLAY_EXPORT PhosphorLayer::Role makePerInstanceRole (const PhosphorLayer::Role &base, QStringView screenId, quint64 generation)
 Build a per-instance PhosphorLayer::Role by appending -{screenId}-{generation} to base's scope prefix.
 

Function Documentation

◆ makePerInstanceRole()

PHOSPHOROVERLAY_EXPORT PhosphorLayer::Role PhosphorOverlay::makePerInstanceRole ( const PhosphorLayer::Role base,
QStringView  screenId,
quint64  generation 
)

Build a per-instance PhosphorLayer::Role by appending -{screenId}-{generation} to base's scope prefix.

Single-source for the policy "per-instance scope prefix-matches the base role's prefix" so the SurfaceAnimator's longest-prefix lookup always resolves the base role's registered config.

Pre-existing failure modes this prevents:

  • Build the per-instance literal from scratch (e.g. typo), or
  • Pass a different base role and re-type the literal, then later rename the family role. Either case made the longest-prefix match silently miss and the surface fell back to the library's empty default config.
Parameters
baseNamed base role (e.g. PassiveShell pattern in PZ).
screenIdEffective screen id (physical or virtual).
generationMonotonic per-process counter, e.g. from PhosphorSurfaces::SurfaceManager::nextScopeGeneration().