Several JCK test cases fail on Mac for approximately such a reason: after an owned focused window become non-focused, the focus don't go back to the previously focused window, the owner.
I've concocted a small rude snippet reproducing that (attached). The JCK test in question could be started via jck4jdk as
java -jar $SOMEWHERE/JCK-runtime-8/lib/jtjck.jar -jck $SOMEWHERE/JCK-runtime-8 -jdk $JDK_TO_TEST api/java_awt/awt_focus_subsystem/focusable_windows/index.html#FocusableWindow3
(it may be jck7 as well).