2004/01/20 20:33:48
authorxwt <xwt@xwt.org>
Fri, 30 Jan 2004 08:05:10 +0000 (08:05 +0000)
committerxwt <xwt@xwt.org>
Fri, 30 Jan 2004 08:05:10 +0000 (08:05 +0000)
darcs-hash:20040130080510-3ac31-45876f2b3ee53139c3c4c52d1462d4f1bf8ef244.gz

src/org/xwt/plat/Win32.java
src/org/xwt/plat/X11.cc

index cd8a843..a17323b 100644 (file)
@@ -38,10 +38,11 @@ public class Win32 extends GCJ {
 
     public static native String getTempPath();
     public static native void natInit();
+    public static native void natPreInit();
 
     protected native String _fileDialog(String suggestedFileName, boolean write);
 
-    public Win32() { }
+    public Win32() { natPreInit(); }
 
     public void postInit() {
         new Thread() { public void run() { natInit(); } }.start();
index 6b5c370..2bdb083 100644 (file)
@@ -69,13 +69,14 @@ static void ensureShmSize(int size) {
 void org::xwt::plat::X11$X11PixelBuffer::fastDrawPicture(org::xwt::Picture* s,
                                                          jint dx, jint dy, jint cx1, jint cy1, jint cx2, jint cy2) {
     org::xwt::plat::X11$X11Picture* source = (org::xwt::plat::X11$X11Picture*)s;
-    
+
     if (source->doublebuf->stipple != NULL) {
         XSetClipMask(display, (*((GC*)clipped_gc)), *((Pixmap*)source->doublebuf->stipple));
-        XSetClipOrigin(display, (*((GC*)clipped_gc)), cx1 - dx, cy1 - dy);
+        XSetClipOrigin(display, (*((GC*)clipped_gc)), dx, dy);
     } else {
         XSetClipMask(display, (*((GC*)clipped_gc)), None);
     }
+
     XCopyArea(display,
               *((Pixmap*)source->doublebuf->pm), (*((Pixmap*)pm)), (*((GC*)clipped_gc)),
               cx1 - dx, cy1 - dy, cx2 - cx1, cy2 - cy1, cx1, cy1);