From 36ea8a7d0a945146df13b0f5da7dd1ac50806f1a Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 27 Nov 2014 19:19:53 +0100 Subject: [PATCH] Cleanup (outdated anti-focus-stealing hack dropped) --- .../intellij/openapi/wm/impl/IdeFrameImpl.java | 18 +----------------- .../util/resources/misc/registry.properties | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java index 5a6d906dd0e8..e933833648df 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java @@ -77,8 +77,6 @@ public class IdeFrameImpl extends JFrame implements IdeFrameEx, DataProvider { private static boolean myUpdatingTitle; - private static String xdgCurrentDesktop = System.getenv("XDG_CURRENT_DESKTOP"); - private String myTitle; private String myFileTitle; private File myCurrentFile; @@ -116,10 +114,6 @@ public class IdeFrameImpl extends JFrame implements IdeFrameEx, DataProvider { myBalloonLayout = new BalloonLayoutImpl(myRootPane, new Insets(8, 8, 8, 8)); - if (!Registry.is("ide.windowSystem.focusAppOnStartup") && !isThereActiveFrame()) { - setFocusableWindowState(false); - } - // to show window thumbnail under Macs // http://lists.apple.com/archives/java-dev/2009/Dec/msg00240.html if (SystemInfo.isMac) setIconImage(null); @@ -206,22 +200,12 @@ public class IdeFrameImpl extends JFrame implements IdeFrameEx, DataProvider { return null; } - public static boolean isThereActiveFrame() { - Frame[] all = Frame.getFrames(); - for (Frame each : all) { - if (each.isActive()) { - return true; - } - } - - return false; - } - @SuppressWarnings({"deprecation", "SSBasedInspection"}) @Override public void show() { super.show(); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { setFocusableWindowState(true); } diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index bd09bd415c8b..b36aeb8a798a 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -85,7 +85,6 @@ ide.appIcon.requestAttention=true ide.windowSystem.hScrollChars=5 ide.windowSystem.vScrollChars=5 -ide.windowSystem.focusAppOnStartup=true ide.windowSystem.autoShowProcessPopup=false ide.windowSystem.showListItemsPopup=true ide.windowSystem.asyncSplitters=true