2003/09/19 05:01:38
[org.ibex.core.git] / src / org / xwt / plat / Java2.java
index 9b413ff..40ae9c3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL]
+// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.xwt.plat;
 
 import java.awt.*;
@@ -18,7 +18,8 @@ public class Java2 extends AWT {
 
     private boolean isJava14 = false;
     protected boolean _supressDirtyOnResize() {
-        return (isJava14 && !System.getProperty("os.name", "").equals("Mac OS X"))? false : true;
+        return false;
+        //return (isJava14 && !System.getProperty("os.name", "").equals("Mac OS X"))? false : true;
     }
 
     public Java2() {
@@ -26,6 +27,7 @@ public class Java2 extends AWT {
         String versionString = System.getProperty("java.version", "");
         int secondDecimal = versionString.substring(versionString.indexOf('.') + 1).indexOf('.');
         if (secondDecimal != -1) versionString = versionString.substring(0, secondDecimal);
+        /*
         double version = Double.parseDouble(versionString);
         if (version >= 1.4) {
             isJava14 = true;
@@ -38,6 +40,7 @@ public class Java2 extends AWT {
                 Log.log(this, e);
             }
         }
+        */
         javax.swing.FocusManager.setCurrentManager(new javax.swing.FocusManager() {
                 public void processKeyEvent(Component focusedComponent, KeyEvent anEvent) { }
                 public void focusPreviousComponent(Component aComponent) { }
@@ -137,11 +140,11 @@ public class Java2 extends AWT {
         public void blit(DoubleBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2) {
             if (ourGraphics == null) {
                 ourGraphics = window.getGraphics();
-
+                
                 // sometimes jdk1.4 doesn't set the clip properly when we're in the middle of a resize
-                ourGraphics.setClip(insets.left, insets.top, width + insets.left, height + insets.top);
+                ourGraphics.setClip(insets.left, insets.top, root.width + insets.left, root.height + insets.top);
             }
-            _doDrawImage(ourGraphics, ((AWTDoubleBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
+            _doDrawImage(window.getGraphics(), ((AWTDoubleBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
                          sx, sy, sx + (dx2 - dx), sy + (dy2 - dy), null);
         }