Setting focus via the command prompt?
Anyone happen to know of a way to set the focus to a particular window via a shell command? I have a perl application that invokes xine, then goes into a raw character mode to consume characters from the terminal. Unfortunately, when xine is invoked, the focus is switched out of the terminal window and I have to move the mouse in order to reestablish focus. Since the program is all about speed and efficiency, I do not want to have to do this. Any ideas? I'm assuming I'd start by using 'xwininfo' to establish the id of the window I want focus placed into, but once I have said id, what program do I pass it to? If there isn't one, I can obviously write a tiny little X app that will do it (which will probably take a few days of manual reading) or someone can send me the presumably 10 lines of code necessary and I'll be eternally grateful :- )
Hmmm. While I'm on this track, how about a means of moving the mouse to a particular position on the desktop via a command-line prompt? That would also do the trick, since I could just move the mouse into my window (and since I have 'focus-on-over' set, that should be sufficient).
Thanks in advance,