Drag policy — daemon-authoritative decision about how a drag should be handled. More...
#include <phosphor-protocol/include/PhosphorProtocol/DragTypes.h>
Public Member Functions | |
| QString | validationError () const |
| Returns empty QString if valid, or a human-readable description of the invariant violation. | |
| bool | operator== (const DragPolicy &) const =default |
| Full structural equality. | |
Public Attributes | |
| bool | streamDragMoved = false |
| effect should send dragMoved D-Bus ticks | |
| bool | showOverlay = false |
| daemon will show zone overlay during this drag | |
| bool | grabKeyboard = false |
| effect should grab keyboard (Escape cancel) | |
| bool | captureGeometry = false |
| effect should capture pre-drag geometry | |
| bool | immediateFloatOnStart = false |
| effect should call handleDragToFloat(immediate) at drag start | |
| QString | screenId |
| screen the drag started/currently is on (virtual-screen-aware) | |
| DragBypassReason | bypassReason = DragBypassReason::None |
| drag routing (None = canonical snap path) | |
Drag policy — daemon-authoritative decision about how a drag should be handled.
Returned from WindowDragAdaptor::beginDrag at drag start and re-emitted via dragPolicyChanged if the cursor crosses a screen boundary that flips the mode (autotile↔snap). The compositor plugin uses this to decide whether to stream dragMoved, grab keyboard, show an overlay, and whether to apply an immediate float transition for an autotile drag.
Wire: (bbbbbss) — 5 bools + 2 strings
Single source of truth replaces the effect-side m_dragBypassedForAutotile / m_cachedZoneSelectorEnabled cache that went stale after every settings reload.
|
default |
Full structural equality.
Used by WindowDragAdaptor::updateDragCursor to detect per-screen policy changes during a drag — any field that participates in routing (bypass reason, screen id, the behavior flags) is compared, so future fields are picked up automatically without touching the comparator.
| QString PhosphorProtocol::DragPolicy::validationError | ( | ) | const |
Returns empty QString if valid, or a human-readable description of the invariant violation.
Call at every unmarshal site on the effect side to catch garbled policies before they perturb drag state.
| DragBypassReason PhosphorProtocol::DragPolicy::bypassReason = DragBypassReason::None |
drag routing (None = canonical snap path)
| bool PhosphorProtocol::DragPolicy::captureGeometry = false |
effect should capture pre-drag geometry
| bool PhosphorProtocol::DragPolicy::grabKeyboard = false |
effect should grab keyboard (Escape cancel)
| bool PhosphorProtocol::DragPolicy::immediateFloatOnStart = false |
effect should call handleDragToFloat(immediate) at drag start
| QString PhosphorProtocol::DragPolicy::screenId |
screen the drag started/currently is on (virtual-screen-aware)
| bool PhosphorProtocol::DragPolicy::showOverlay = false |
daemon will show zone overlay during this drag
| bool PhosphorProtocol::DragPolicy::streamDragMoved = false |
effect should send dragMoved D-Bus ticks