From d095a7b1c41af7c26bb23645adcb714bcc845e0f Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Thu, 3 Sep 2009 16:13:24 +0400 Subject: [PATCH] Fullscreen mode is back for Mac OS X Snow Leopard --- build/mac/Info.plist | 2 ++ .../com/intellij/ide/actions/ToggleFullScreenModeAction.java | 9 ++++----- platform/util/src/com/intellij/openapi/util/SystemInfo.java | 11 +++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build/mac/Info.plist b/build/mac/Info.plist index 119c3d7f3b..3c7c31659e 100644 --- a/build/mac/Info.plist +++ b/build/mac/Info.plist @@ -83,6 +83,8 @@ true apple.awt.graphics.UseQuartz true + apple.awt.fullscreencapturealldisplays + false VMOptions -Xms32m -Xmx256m -XX:MaxPermSize=150m -Xbootclasspath/a:../lib/boot.jar -ea diff --git a/platform/platform-impl/src/com/intellij/ide/actions/ToggleFullScreenModeAction.java b/platform/platform-impl/src/com/intellij/ide/actions/ToggleFullScreenModeAction.java index 2c13787f2c..24b167014f 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ToggleFullScreenModeAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ToggleFullScreenModeAction.java @@ -3,8 +3,8 @@ package com.intellij.ide.actions; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.actionSystem.ToggleAction; -import com.intellij.openapi.project.Project; import com.intellij.openapi.project.DumbAware; +import com.intellij.openapi.project.Project; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.wm.ToolWindow; import com.intellij.openapi.wm.ToolWindowManager; @@ -92,10 +92,9 @@ public final class ToggleFullScreenModeAction extends ToggleAction implements Du public void update(AnActionEvent e){ super.update(e); - IdeFrameImpl frame=getFrame(e); - final boolean operational = !SystemInfo.isMac && // Disabled full screen mode for Mac since it doesn't work anyway - frame != null && - frame.getGraphicsConfiguration().getDevice().isFullScreenSupported(); + IdeFrameImpl frame = getFrame(e); + final boolean operational = frame != null && frame.getGraphicsConfiguration().getDevice().isFullScreenSupported() && + (!SystemInfo.isMac || SystemInfo.isMacOSSnowLeopard); e.getPresentation().setVisible(operational); e.getPresentation().setEnabled(operational); } diff --git a/platform/util/src/com/intellij/openapi/util/SystemInfo.java b/platform/util/src/com/intellij/openapi/util/SystemInfo.java index 9603161a5a..963e58079c 100644 --- a/platform/util/src/com/intellij/openapi/util/SystemInfo.java +++ b/platform/util/src/com/intellij/openapi/util/SystemInfo.java @@ -76,6 +76,13 @@ public class SystemInfo { public static final boolean isMacOSLeopard = isLeopard(); /** + * Running under MacOS X version 10.5 or later; + * + * @since 9.0 + */ + public static final boolean isMacOSSnowLeopard = isSnowLeopard(); + + /** * Operating system is supposed to have middle mouse button click occupied by paste action. * @since 6.0 */ @@ -97,6 +104,10 @@ public class SystemInfo { return isMac && isTiger() && !OS_VERSION.startsWith("10.4"); } + private static boolean isSnowLeopard() { + return isMac && isLeopard() && !OS_VERSION.startsWith("10.5"); + } + public static boolean isJavaVersionAtLeast(String v) { return StringUtil.compareVersionNumbers(JAVA_RUNTIME_VERSION, v) >= 0; } -- 2.11.4.GIT