Skip to content

Commit 916c32c

Browse files
authored
fix: allow negative coordinates when swiping (#130)
1 parent 03174fe commit 916c32c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

commands/input.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ func GestureCommand(req GestureRequest) *CommandResponse {
196196

197197
// SwipeCommand performs a swipe operation on the specified device
198198
func SwipeCommand(req SwipeRequest) *CommandResponse {
199-
if req.X1 < 0 || req.Y1 < 0 || req.X2 < 0 || req.Y2 < 0 {
200-
return NewErrorResponse(fmt.Errorf("all coordinates must be non-negative, got x1=%d, y1=%d, x2=%d, y2=%d", req.X1, req.Y1, req.X2, req.Y2))
201-
}
202-
203199
targetDevice, err := FindDeviceOrAutoSelect(req.DeviceID)
204200
if err != nil {
205201
return NewErrorResponse(fmt.Errorf("error finding device: %v", err))

0 commit comments

Comments
 (0)