coordFromAction extracts the coordinate pair from a DesktopAction, returning an error if the coordinate field is missing.
(action DesktopAction)
| 735 | // coordFromAction extracts the coordinate pair from a DesktopAction, |
| 736 | // returning an error if the coordinate field is missing. |
| 737 | func coordFromAction(action DesktopAction) (x, y int, err error) { |
| 738 | if action.Coordinate == nil { |
| 739 | return 0, 0, &missingFieldError{field: "coordinate", action: action.Action} |
| 740 | } |
| 741 | return action.Coordinate[0], action.Coordinate[1], nil |
| 742 | } |
| 743 | |
| 744 | func desktopGeometryForAction(cfg DisplayConfig, action DesktopAction) workspacesdk.DesktopGeometry { |
| 745 | declaredWidth := cfg.Width |