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

The window's own context for per-window mode resolution: its virtual desktop (0 = all/unknown), the full desktop list when it spans several (empty otherwise), and activity (empty = all/unknown), read without copying the full ~30-field metadata record — this sits on the per-query float-resolver path. More...

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

Public Member Functions

int effectiveDesktop (int screenCurrentDesktop) const
 Effective desktop for per-window mode resolution: the window's own desktop when known (virtualDesktop > 0), never the screen's current one — reading through the screen's current desktop is what made the effective float answer flip across per-output desktop switches.
 
QString effectiveActivity (const QString &currentActivity) const
 Effective activity: the window's own when known, else currentActivity.
 

Public Attributes

int virtualDesktop = 0
 
QList< int > virtualDesktops
 
QString activity
 

Detailed Description

The window's own context for per-window mode resolution: its virtual desktop (0 = all/unknown), the full desktop list when it spans several (empty otherwise), and activity (empty = all/unknown), read without copying the full ~30-field metadata record — this sits on the per-query float-resolver path.

nullopt when the instance is unknown.

Member Function Documentation

◆ effectiveActivity()

QString PhosphorEngine::WindowRegistry::WindowContext::effectiveActivity ( const QString &  currentActivity) const
inline

Effective activity: the window's own when known, else currentActivity.

No span analogue to effectiveDesktop's current-context preference exists here — the metadata carries only the window's first activity, not a list, so there is nothing to prefer against.

◆ effectiveDesktop()

int PhosphorEngine::WindowRegistry::WindowContext::effectiveDesktop ( int  screenCurrentDesktop) const
inline

Effective desktop for per-window mode resolution: the window's own desktop when known (virtualDesktop > 0), never the screen's current one — reading through the screen's current desktop is what made the effective float answer flip across per-output desktop switches.

EXCEPTION: a window spanning SEVERAL desktops resolves to screenCurrentDesktop when that is one of them — the visible spanned desktop is the live context governing the window, not the arbitrary first entry virtualDesktop pins to. Sticky / unknown (virtualDesktop 0) falls back to screenCurrentDesktop.

Member Data Documentation

◆ activity

QString PhosphorEngine::WindowRegistry::WindowContext::activity

◆ virtualDesktop

int PhosphorEngine::WindowRegistry::WindowContext::virtualDesktop = 0

◆ virtualDesktops

QList<int> PhosphorEngine::WindowRegistry::WindowContext::virtualDesktops

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