If you do xwininfo
it will give you the window id, however, this requires clicking the mouse over a target window. Is there any way to force the window manager, or at least suggest to the window manager, to use a specific id. Something like
gedit windowid=0x12345678
I have uploaded some files to GitHub (see here or here) demonstrating how I managed to work around this. If you look at them you'll get a better feel for what it is I am attempting to do.