Is there a way to automatically click at a specific place in specific window without getting the window focused?
I've just been struggling with the same problem and this is the best option I could come up with:
$ (w=`xdotool getactivewindow` && xdotool click 1 && xdotool windowactivate $w)
This line saves the ID of the currently active window, then issues the
click command at the location of the mouse cursor, and then forces the focus to go back to the window that was active.
Thus, the target window WILL gain focus for a split second, but then the focus will return to the original window.
This is suboptimal, but may be an acceptable solution depending on what you are doing.