ugly hacks to accomodate Apple's buggy AWT implementation
[org.ibex.core.git] / src / org / ibex / core / Main.java
index 4fd76f0..39e23d2 100644 (file)
@@ -15,6 +15,17 @@ import org.ibex.graphics.*;
 /** Entry point for the Ibex Engine; handles splash screen, initial xwar loading, and argument processing */
 public class Main {
 
 /** Entry point for the Ibex Engine; handles splash screen, initial xwar loading, and argument processing */
 public class Main {
 
+    // ugly hack: we have to set these properties before AWT loads
+    static {
+        System.setProperty("apple.awt.showGrowBox", "false");
+        System.setProperty("apple.awt.graphics.EnableLazyDrawing", "40");
+        System.setProperty("apple.awt.graphics.EnableLazyDrawing", "true");
+        System.setProperty("apple.awt.window.position.forceSafeUserPositioning", "true");
+        System.setProperty("apple.awt.window.position.forceSafeCreation", "true");
+        System.setProperty("com.apple.hwaccel", "true");
+        System.setProperty("com.apple.forcehwaccel", "true");
+    }
+
     /**
      *  FEATURE: this should be implemented using self-emulation
      *  Used for security checks. If this is null, it means that only
     /**
      *  FEATURE: this should be implemented using self-emulation
      *  Used for security checks. If this is null, it means that only