A shell script to bring the qemu window to the front in KDE?
I'm writing a little wrapper-style shell script to start qemu up with the appropriate parameters for my setup -- the idea would be to insert this into a KDE menu. One thing I'd like the wrapper to do is figure out whether qemu is currently running, and if so, simply bring its window to the front (rather than launching a second instance -- which is kind of impressive in its own way, but ...).
Figuring out whether qemu is currently running isn't that hard, but I'm having trouble figuring out how to bring its window to the front. I guess this may really be a KDE question or an X Window question, or an SDL question, but I figured I'd ask here, as someone must have solved it before (I hope).
I hunted around a little for answers, and found some stuff that applies to "native" KDE applications (i.e. using dcop), but I didn't find a more general X Window (or SDL) answer -- but I'm not at all sure I was looking in the right places.