Xinerama suppression reverted

This commit is contained in:
Roman Shevchenko
2013-08-21 21:00:21 +04:00
parent b81debea35
commit dbb57c5ddb
4 changed files with 5 additions and 19 deletions
@@ -15,6 +15,7 @@
*/
package com.intellij.ui;
import com.intellij.Patches;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.util.containers.WeakHashMap;
@@ -164,6 +165,10 @@ public class ScreenUtil {
}
private static Insets calcInsets(GraphicsConfiguration gc) {
if (Patches.SUN_BUG_ID_9000030 && GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices().length > 1) {
return new Insets(0, 0, 0, 0);
}
return Toolkit.getDefaultToolkit().getScreenInsets(gc);
}
@@ -105,7 +105,6 @@ public class StartupUtil {
loadSystemLibraries(log);
if (!Main.isHeadless()) {
AppUIUtil.patchSystem();
AppUIUtil.updateWindowIcon(JOptionPane.getRootFrame());
AppUIUtil.registerBundledFonts();
}
@@ -15,7 +15,6 @@
*/
package com.intellij.ui;
import com.intellij.Patches;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ApplicationNamesInfo;
@@ -26,7 +25,6 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.wm.ToolWindowManager;
import com.intellij.util.PlatformUtils;
@@ -49,21 +47,6 @@ import java.util.List;
public class AppUIUtil {
private static final String VENDOR_PREFIX = "jetbrains-";
public static void patchSystem() {
if (Patches.SUN_BUG_ID_9000030 && Registry.is("ide.x11.suppress.xinerama")) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
if (ge.getScreenDevices().length > 1) {
try {
@SuppressWarnings("SpellCheckingInspection") Field xinerState = ge.getClass().getDeclaredField("xinerState");
xinerState.setAccessible(true);
xinerState.set(null, Boolean.FALSE);
Logger.getInstance(AppUIUtil.class).info("Xinerama detection suppressed");
}
catch (Exception ignored) { }
}
}
}
public static void updateWindowIcon(@NotNull Window window) {
window.setIconImages(getAppIconImages());
}
@@ -65,7 +65,6 @@ idea.fix.mac.env=true
idea.fix.mac.env.description=On Mac, use shell environment for external processes (effective on restart).
ide.x11.override.wm=true
ide.x11.suppress.xinerama=true
ide.appIcon.progress=true
ide.appIcon.badge=true