in reply to X11-GUITest for full screen apps

Use GetInputFocus to get the window which has focus

or use http://cpansearch.perl.org/src/CTRONDLP/X11-GUITest-0.21/eg/FindWindowLike.pl to dump all the windows, the game should be in there -- if not, sleep for a few seconds and assume the game has taken over the screen and start clicking

Or configure your x11 system to disable a full-screen root window