diff options
author | Sven Gothel <[email protected]> | 2011-08-31 15:43:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-31 15:43:36 +0200 |
commit | d48097a2492e17b1082bdf497df732fd49d7d1c9 (patch) | |
tree | 5e378c539f6a984d973b5b2d544e7ec47bfecb99 /src/newt/classes | |
parent | b54497155815852744adb657816cb4057948dae2 (diff) |
NEWT/X11 Display: CloseDisplay in same order as creation (ATI); Adding DisplayRelease0; Using 'EDT' suffix for display arguments
CloseDisplay in same order as creation (ATI)
- This enhanced the erroneous bug 515 (b54497155815852744adb657816cb4057948dae2) situation
with closing the display connections. However, some SIGSEGV still slipped through.
Adding DisplayRelease0
- Intended for cleaning up resources. Currently a NOP.
Using 'EDT' suffix for display arguments
- To mark the semantics of the display connection, which may be for window or EDT now.
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/x11/X11Display.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Display.java b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java index 94e5a0bcc..86fd8df40 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/X11Display.java +++ b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java @@ -67,7 +67,7 @@ public class X11Display extends DisplayImpl { protected void createNativeImpl() { long handle = X11Util.createDisplay(name); if( 0 == handle ) { - throw new RuntimeException("Error creating display: "+name); + throw new RuntimeException("Error creating display(Win): "+name); } if(USE_SEPARATE_DISPLAY_FOR_EDT) { edtDisplayHandle = X11Util.createDisplay(name); @@ -95,11 +95,16 @@ public class X11Display extends DisplayImpl { } protected void closeNativeImpl() { + DisplayRelease0(edtDisplayHandle, javaObjectAtom, windowDeleteAtom); + javaObjectAtom = 0; + windowDeleteAtom = 0; + // closing using ATI driver bug 'same order' final long handle = getHandle(); + X11Util.closeDisplay(handle); if(handle != edtDisplayHandle) { X11Util.closeDisplay(edtDisplayHandle); } - X11Util.closeDisplay(handle); + edtDisplayHandle = 0; } protected void dispatchMessagesNative() { @@ -119,12 +124,13 @@ public class X11Display extends DisplayImpl { private native void CompleteDisplay0(long handleEDT); - private native void DispatchMessages0(long display, long javaObjectAtom, long windowDeleteAtom); - private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) { this.javaObjectAtom=javaObjectAtom; this.windowDeleteAtom=windowDeleteAtom; } + private native void DisplayRelease0(long handleEDT, long javaObjectAtom, long windowDeleteAtom); + + private native void DispatchMessages0(long displayEDT, long javaObjectAtom, long windowDeleteAtom); /** * 2011/06/14 libX11 1.4.2 and libxcb 1.7 bug 20708 - Multithreading Issues w/ OpenGL, .. |