Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where sync would wait if the mouse didn't need to move. #464

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

jordansissel
Copy link
Owner

A case where xdotool mousemove --sync is used, and the cursor is already at the requested position, xdotool would wait even though the cursor was already at the current position.

This happened because mousemove --sync waits for the cursor to move away from its current position, but if mousemove is given the position where the cursor already is, then --sync will cause it incorrectly to wait.

Reproducing this:

xdotool mousemove --sync 5 5     # works
xdotool mousemove --sync 5 5     # hangs until I move the mouse manually

Reported by @MXarko

Fixes #463

A case where `xdotool mousemove --sync` is used, and the cursor is already at the requested position, xdotool would wait even though the cursor was already at the current position.

This happened because `mousemove --sync` waits for the cursor to move *away* from its current position, but if mousemove is given the position where the cursor already is, then `--sync` will cause it incorrectly to wait.

Reproducing this:

```
xdotool mousemove --sync 5 5     # works
xdotool mousemove --sync 5 5     # hangs until I move the mouse manually
```

Reported by @MXarko

Fixes #463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"mousemove" to the same position jams read operation
1 participant