diff options
Diffstat (limited to 'src/nativewindow')
3 files changed, 20 insertions, 13 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java index 5da7974b0..9cc15c650 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java @@ -82,28 +82,28 @@ public abstract class NativeWindowFactory { protected static final boolean DEBUG; /** OpenKODE/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}.*/ - public static final String TYPE_EGL = ".egl".intern(); + public static final String TYPE_EGL = ".egl"; /** Microsoft Windows type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_WINDOWS = ".windows".intern(); + public static final String TYPE_WINDOWS = ".windows"; /** X11 type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_X11 = ".x11".intern(); + public static final String TYPE_X11 = ".x11"; /** Broadcom VC IV/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_BCM_VC_IV = ".bcm.vc.iv".intern(); + public static final String TYPE_BCM_VC_IV = ".bcm.vc.iv"; /** Android/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}.*/ - public static final String TYPE_ANDROID = ".android".intern(); + public static final String TYPE_ANDROID = ".android"; /** Mac OS X type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_MACOSX = ".macosx".intern(); + public static final String TYPE_MACOSX = ".macosx"; /** Generic AWT type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_AWT = ".awt".intern(); + public static final String TYPE_AWT = ".awt"; /** Generic DEFAULT type, where platform implementation don't care, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_DEFAULT = ".default".intern(); + public static final String TYPE_DEFAULT = ".default"; private static final String nativeWindowingTypePure; // canonical String via String.intern() private static final String nativeWindowingTypeCustom; // canonical String via String.intern() diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java index e59ff2ea8..6af5467f0 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java @@ -463,10 +463,12 @@ public class X11Util implements ToolkitProperties { if(markAllDisplaysUnclosable) { namedDpy.setUncloseable(true); } - } - if(DEBUG) { - System.err.println("X11Util.Display: openDisplay [reuse "+reused+"] "+namedDpy+". Thread "+Thread.currentThread().getName()); - // Thread.dumpStack(); + if(DEBUG) { + System.err.println("X11Util.Display: openDisplay [reuse "+reused+"] "+namedDpy+ + ". Open[reuseable "+reusableDisplayList.size()+", pending "+pendingDisplayList.size()+ + "]. Thread "+Thread.currentThread().getName()); + // Thread.dumpStack(); + } } return namedDpy.getHandle(); } diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index ce4a3b7ee..80ddee415 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -336,6 +336,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 (JNIEnv *env, jclass unused, jint x, jint y, jint width, jint height) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + [CATransaction begin]; NSRect rect = NSMakeRect(x, y, width, height); // Allocate the window @@ -365,6 +366,7 @@ NS_ENDHANDLER // [myView lockFocus]; // [myView unlockFocus]; + [CATransaction commit]; [pool release]; return (jlong) ((intptr_t) myWindow); @@ -379,9 +381,12 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_DestroyNSWindow0 (JNIEnv *env, jclass unused, jlong nsWindow) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSWindow* mWin = (NSWindow*) ((intptr_t) nsWindow); + [CATransaction begin]; + NSWindow* mWin = (NSWindow*) ((intptr_t) nsWindow); [mWin close]; // performs release! + + [CATransaction commit]; [pool release]; } |