Virtual-screen ID format utilities. More...
Functions | |
| bool | isVirtual (const QString &screenId) |
| Check if a screen ID is a virtual screen ID (contains "/vs:"). | |
| QString | extractPhysicalId (const QString &screenId) |
| Extract the physical screen ID from a virtual screen ID. | |
| int | extractIndex (const QString &screenId) |
| Extract the virtual screen index from a virtual screen ID. | |
| QString | make (const QString &physicalScreenId, int index) |
| Construct a virtual screen ID from physical ID and index. | |
| bool | samePhysical (const QString &idA, const QString &idB) |
| Check if two screen IDs share the same physical screen. | |
| bool | isVirtualScreenCrossing (const QString &oldScreenId, const QString &newScreenId) |
| Detect a virtual-screen crossing: the screen IDs differ, but both belong to the same physical monitor. | |
Variables | |
| constexpr QLatin1String | Separator {"/vs:"} |
| Separator between physical screen ID and virtual index. | |
Virtual-screen ID format utilities.
Stable cross-process format for the IDs that identify a sub-region of a physical monitor when the user has subdivided it: "<physicalId>/vs:<index>".
Same role as WindowId for window identity — a single source of truth for the wire-format string. Daemon, KWin effect, KCM, and any future compositor plugin must spell it the same way; this header is the place to change that spelling if it ever needs to change.
Header-only and inline throughout: no link cost, safe to include everywhere identity strings are handled.
|
inline |
Extract the virtual screen index from a virtual screen ID.
Returns -1 if not a virtual screen ID.
|
inline |
Extract the physical screen ID from a virtual screen ID.
Returns the original ID if not a virtual screen ID.
|
inline |
Check if a screen ID is a virtual screen ID (contains "/vs:").
|
inline |
Detect a virtual-screen crossing: the screen IDs differ, but both belong to the same physical monitor.
Returns false when both IDs are plain physical IDs (outputChanged handles those) or when they belong to different physical monitors.
|
inline |
Construct a virtual screen ID from physical ID and index.
|
inline |
Check if two screen IDs share the same physical screen.
For virtual screens (containing "/vs:"), strips the suffix before comparing.
|
inlineconstexpr |
Separator between physical screen ID and virtual index.