Explicit per-context assignment entry storing both mode fields.
More...
#include <phosphor-zones/include/PhosphorZones/AssignmentEntry.h>
Explicit per-context assignment entry storing both mode fields.
Each screen/desktop/activity context stores an explicit Mode, SnappingLayout (UUID), and PhosphorTiles::TilingAlgorithm. Toggling between modes only flips the mode field — the other field is preserved, eliminating the need for shadow assignments.
◆ Mode
Per-context engine selection.
The v4 rule store persists the WIRE STRINGS produced by modeToWireString ("snapping", "autotile", "scrolling") — ContextRuleBridge::makeDisableRule writes them and disableRuleMode reads them back. The legacy v3→v4 config migration (configmigration.cpp) does still read the int side via Display.<screen>:Mode, so NEVER renumber existing values — a renumber would silently swap engines for v3 disable lists that haven't been migrated yet. Append new modes at the end.
| Enumerator |
|---|
| Snapping | |
| Autotile | |
| Scrolling | Reserved engine slot for a future scrolling-workspace engine.
The settings UI exposes the mode and persists per-mode disable lists / config groups, but the router currently has no engine to hand windows to — see ScreenModeRouter::engineFor for the passthrough fallback (returns nullptr for Scrolling) that lets KWin place the window naturally rather than blocking on a missing engine. A real engine implementer adds an adapter to the router and removes the passthrough; no daemon-internal switch needs to be edited because the (Mode, Family) settings table here drives all downstream config routing.
|
◆ activeLayoutId()
| QString PhosphorZones::AssignmentEntry::activeLayoutId |
( |
| ) |
const |
|
inline |
◆ fromLayoutId() [1/2]
| static AssignmentEntry PhosphorZones::AssignmentEntry::fromLayoutId |
( |
const QString & |
layoutId | ) |
|
|
inlinestatic |
◆ fromLayoutId() [2/2]
Update an existing AssignmentEntry from a layoutId, preserving the "other" field.
Mode IS set from the layoutId type — batch operations from the KCM send a single layout ID per context, and that ID determines the active mode. The non-matching field is preserved for easy mode toggling.
◆ isValid()
| bool PhosphorZones::AssignmentEntry::isValid |
( |
| ) |
const |
|
inline |
◆ operator==()
| bool PhosphorZones::AssignmentEntry::operator== |
( |
const AssignmentEntry & |
other | ) |
const |
|
inline |
◆ mode
◆ snappingLayout
| QString PhosphorZones::AssignmentEntry::snappingLayout |
◆ tilingAlgorithm
| QString PhosphorZones::AssignmentEntry::tilingAlgorithm |
The documentation for this struct was generated from the following file: