focus gain is delayed in EDT - that should set it better

This commit is contained in:
Maxmtg
2013-05-27 18:13:23 +00:00
parent 8ccfad27cc
commit 9cdd447729

View File

@@ -19,6 +19,7 @@ package forge.view;
import javax.swing.JButton; import javax.swing.JButton;
import forge.FThreads;
import forge.gui.SOverlayUtils; import forge.gui.SOverlayUtils;
import forge.gui.match.VMatchUI; import forge.gui.match.VMatchUI;
@@ -62,7 +63,7 @@ public class ButtonUtil {
// ensure we don't steal focus from an overlay // ensure we don't steal focus from an overlay
if (!SOverlayUtils.overlayHasFocus()) { if (!SOverlayUtils.overlayHasFocus()) {
button.requestFocusInWindow(); FThreads.invokeInEdtLater(new Runnable() { @Override public void run() { button.requestFocusInWindow(); } });
} }
} }