Drag outcome — daemon-authoritative decision about what to apply at drag end. More...
#include <phosphor-protocol/include/PhosphorProtocol/DragTypes.h>
Public Types | |
| enum | Action : int { NoOp = 0 , ApplyFloat = 1 , ApplySnap = 2 , RestoreSize = 3 , CancelSnap = 4 , NotifyDragOutUnsnap = 5 } |
Public Member Functions | |
| QRect | toRect () const |
| QString | validationError () const |
| Returns empty QString if valid, or a human-readable description of the invariant violation. | |
Public Attributes | |
| int | action = NoOp |
| QString | windowId |
| QString | targetScreenId |
| int | x = 0 |
| int | y = 0 |
| int | width = 0 |
| int | height = 0 |
| QString | zoneId |
| populated for ApplySnap | |
| bool | skipAnimation = false |
| bool | requestSnapAssist = false |
| true → plugin should show snap-assist window picker | |
| EmptyZoneList | emptyZones |
| candidate zones for snap assist (empty unless requestSnapAssist) | |
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
| enum PhosphorProtocol::DragOutcome::Action : int |
|
inline |
| 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).
| int PhosphorProtocol::DragOutcome::action = NoOp |
| EmptyZoneList PhosphorProtocol::DragOutcome::emptyZones |
candidate zones for snap assist (empty unless requestSnapAssist)
| int PhosphorProtocol::DragOutcome::height = 0 |
| bool PhosphorProtocol::DragOutcome::requestSnapAssist = false |
true → plugin should show snap-assist window picker
| bool PhosphorProtocol::DragOutcome::skipAnimation = false |
| QString PhosphorProtocol::DragOutcome::targetScreenId |
| int PhosphorProtocol::DragOutcome::width = 0 |
| QString PhosphorProtocol::DragOutcome::windowId |
| int PhosphorProtocol::DragOutcome::x = 0 |
| int PhosphorProtocol::DragOutcome::y = 0 |
| QString PhosphorProtocol::DragOutcome::zoneId |
populated for ApplySnap