From 367c039ca47ca16fbf722c53acde68a3842784c3 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 23 Sep 2011 14:21:59 +0100 Subject: [PATCH] try even harder to get focus - for benefit of windows 7 (JAL-943) --- src/jalview/gui/Desktop.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index e1356b4..f8d2bf0 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -358,6 +358,18 @@ public class Desktop extends jalview.jbgui.GDesktop implements { jvnews.refreshNews(); jvnews.toFront(); + // try real hard to get focus when the news is first opened + new Thread(new Runnable() { + @Override + public void run() + { + while (jvnews.isVisible() && !jvnews.requestFocusInWindow()) + { + try { Thread.sleep(50); } catch (InterruptedException x) {}; + } + + } + }).start(); } } } -- 1.7.10.2