Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions server/cmd/api/api/computer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *ApiService) MoveMouse(ctx context.Context, request oapi.MoveMouseReques
}

// Move the cursor to the desired coordinates
args = append(args, "mousemove", "--sync", strconv.Itoa(body.X), strconv.Itoa(body.Y))
args = append(args, "mousemove", strconv.Itoa(body.X), strconv.Itoa(body.Y))

// Release modifier keys (keyup)
if body.HoldKeys != nil {
Expand Down Expand Up @@ -156,7 +156,7 @@ func (s *ApiService) ClickMouse(ctx context.Context, request oapi.ClickMouseRequ
}

// Move the cursor
args = append(args, "mousemove", "--sync", strconv.Itoa(body.X), strconv.Itoa(body.Y))
args = append(args, "mousemove", strconv.Itoa(body.X), strconv.Itoa(body.Y))

// click type defaults to click
clickType := oapi.Click
Expand Down Expand Up @@ -515,7 +515,7 @@ func (s *ApiService) Scroll(ctx context.Context, request oapi.ScrollRequestObjec
args = append(args, "keydown", key)
}
}
args = append(args, "mousemove", "--sync", strconv.Itoa(body.X), strconv.Itoa(body.Y))
args = append(args, "mousemove", strconv.Itoa(body.X), strconv.Itoa(body.Y))

// Apply vertical ticks first (sequential as specified)
if body.DeltaY != nil && *body.DeltaY != 0 {
Expand Down Expand Up @@ -626,7 +626,7 @@ func (s *ApiService) DragMouse(ctx context.Context, request oapi.DragMouseReques
}
}
start := body.Path[0]
args1 = append(args1, "mousemove", "--sync", strconv.Itoa(start[0]), strconv.Itoa(start[1]))
args1 = append(args1, "mousemove", strconv.Itoa(start[0]), strconv.Itoa(start[1]))
args1 = append(args1, "mousedown", btn)
log.Info("executing xdotool (drag start)", "args", args1)
if output, err := defaultXdoTool.Run(ctx, args1...); err != nil {
Expand Down
Loading