2

Why xdotool is not clicking when restoring position?

 xdotool mousemove --sync 4000 1000      click 1         mousemove restore

If I don't restore the position, it works, example:

 xdotool mousemove --sync 4000 1000      click 1

EDIT1: What I've tried

eval "$(xdotool getmouselocation --shell)"
xdotool mousemove --sync 4000 1000
xdotool click 1
xdotool mousemove --screen $SCREEN $X $Y

To my surprise, it also does not click.

3

Your application may need you to wait for it to get focus before it accepts button events. If possible, use windowactivate to get the window focused first, or if not, do a short sleep .2 say, after the mousemove and before the click.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.