From b2307d0d83de452569650d3c652409de75608d7f Mon Sep 17 00:00:00 2001 From: Denis Fokin Date: Thu, 28 Nov 2013 15:32:10 +0400 Subject: [PATCH] IDEA-115412 Diff window is minimized after the appearance --- .../src/com/intellij/openapi/ui/FrameWrapper.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java b/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java index 3f0f574d76b5..7e2385430994 100644 --- a/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java +++ b/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,6 +74,9 @@ public class FrameWrapper implements Disposable, DataProvider { private boolean myIsDialog; private boolean myImageWasChanged; + //Skip restoration of MAXIMIZED_BOTH_PROPERTY + private static final boolean WORKAROUND_FOR_JDK_8007219 = SystemInfo.isMac && SystemInfo.isOracleJvm; + public FrameWrapper(Project project) { this(project, null); } @@ -163,7 +166,7 @@ public class FrameWrapper implements Disposable, DataProvider { } if (myImageWasChanged) { frame.setIconImage(myImage); - } + } else { AppUIUtil.updateWindowIcon(myFrame); } @@ -318,7 +321,7 @@ public class FrameWrapper implements Disposable, DataProvider { } } - if (extendedState == Frame.MAXIMIZED_BOTH && frame instanceof JFrame) { + if (!WORKAROUND_FOR_JDK_8007219 && extendedState == Frame.MAXIMIZED_BOTH && frame instanceof JFrame) { ((JFrame)frame).setExtendedState(extendedState); } }