JRE-864 Multiple child windows opened and closed in sequence

Unnecessary checks. No need to wrap anything if you are already on EDT
This commit is contained in:
Denis Fokin
2018-08-09 14:25:55 +03:00
parent 519142a1b6
commit a7fb815e5d
@@ -833,7 +833,6 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer {
@Override
public void windowActivated(final WindowEvent e) {
SwingUtilities.invokeLater(() -> {
final DialogWrapper wrapper = getActiveWrapper();
if (wrapper == null && !myFocusedCallback.isProcessed()) {
myFocusedCallback.setRejected();
@@ -856,7 +855,7 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer {
setupSelectionOnPreferredComponent(toFocus);
if (toFocus != null) {
if (isShowing() && isActive()) {
if (isShowing()) {
toFocus.requestFocus();
notifyFocused(wrapper);
}
@@ -868,7 +867,6 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer {
if (myTypeAheadCallback != null) {
myTypeAheadCallback.setDone();
}
});
}
private void notifyFocused(DialogWrapper wrapper) {