Drag outcome — daemon-authoritative decision about what to apply at drag end.
More...
#include <phosphor-protocol/include/PhosphorProtocol/DragTypes.h>
|
| QRect | toRect () const |
| |
| QString | validationError () const |
| | Returns empty QString if valid, or a human-readable description of the invariant violation.
|
| |
Drag outcome — daemon-authoritative decision about what to apply at drag end.
Returned from WindowDragAdaptor::endDrag. The compositor plugin executes exactly the action specified; no further decisions on the effect side. Wire: (issiiiisbba(...)) — int + 2 strings + 4 ints + string + 2 bools + EmptyZoneList
◆ Action
| Enumerator |
|---|
| NoOp | drag produced no state change (e.g. cancelled with no prior snap)
|
| ApplyFloat | autotile path: mark window floating at current position
|
| ApplySnap | snap path: apply snap geometry to a zone
|
| RestoreSize | drag-out unsnap: restore original size, keep current position
|
| CancelSnap | snap cancelled via Escape
|
| NotifyDragOutUnsnap | drag ended without activation trigger on a previously-snapped window
|
◆ toRect()
| QRect PhosphorProtocol::DragOutcome::toRect |
( |
| ) |
const |
|
inline |
◆ validationError()
| QString PhosphorProtocol::DragOutcome::validationError |
( |
| ) |
const |
Returns empty QString if valid, or a human-readable description of the invariant violation.
Enforces action enum range and per-action cross-field invariants (ApplySnap requires non-empty zoneId + non- zero size, ApplyFloat/RestoreSize/NotifyDragOutUnsnap require windowId, etc).
◆ action
| Action PhosphorProtocol::DragOutcome::action = NoOp |
Typed as Action (not int) so every switch over it is exhaustiveness-checked by -Wswitch and a local misassignment cannot compile; the wire boundary casts through int and the runtime range check in validationError() defends against a peer at a different revision.
◆ emptyZones
candidate zones for snap assist (empty unless requestSnapAssist)
◆ height
| int PhosphorProtocol::DragOutcome::height = 0 |
◆ requestSnapAssist
| bool PhosphorProtocol::DragOutcome::requestSnapAssist = false |
true → plugin should show snap-assist window picker
◆ skipAnimation
| bool PhosphorProtocol::DragOutcome::skipAnimation = false |
◆ targetScreenId
| QString PhosphorProtocol::DragOutcome::targetScreenId |
◆ width
| int PhosphorProtocol::DragOutcome::width = 0 |
◆ windowId
| QString PhosphorProtocol::DragOutcome::windowId |
| int PhosphorProtocol::DragOutcome::x = 0 |
| int PhosphorProtocol::DragOutcome::y = 0 |
◆ zoneId
| QString PhosphorProtocol::DragOutcome::zoneId |
The documentation for this struct was generated from the following file: