From e2bc1a03c3de8c79aeb597f918123085d59d2896 Mon Sep 17 00:00:00 2001 From: xwt Date: Fri, 30 Jan 2004 08:05:10 +0000 Subject: [PATCH] 2004/01/20 20:33:48 darcs-hash:20040130080510-3ac31-45876f2b3ee53139c3c4c52d1462d4f1bf8ef244.gz --- src/org/xwt/plat/Win32.java | 3 ++- src/org/xwt/plat/X11.cc | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/org/xwt/plat/Win32.java b/src/org/xwt/plat/Win32.java index cd8a843..a17323b 100644 --- a/src/org/xwt/plat/Win32.java +++ b/src/org/xwt/plat/Win32.java @@ -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(); diff --git a/src/org/xwt/plat/X11.cc b/src/org/xwt/plat/X11.cc index 6b5c370..2bdb083 100644 --- a/src/org/xwt/plat/X11.cc +++ b/src/org/xwt/plat/X11.cc @@ -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); -- 1.7.10.4