Our application uses a local event queue which is pushed onto the stack at startup. Now waitForIdle in Robot.java waits for all known queues to be empty and this works fine in Java 1.6.
Unfortunately the Java 1.7 version of EventQueue.push sticks an invocation event onto the current queue before switching to the new queue:
// Wake up EDT waiting in getNextEvent(), so it can
// pick up a new EventQueue. Post the waking event before
// topQueue.nextQueue is assigned, otherwise the event would
// go newEventQueue
topQueue.postEventPrivate(new InvocationEvent(topQueue, dummyRunnable));
So this invocation event enters the old queue and is never removed – hence waitForIdle always times out because a queue never becomes empty.