diff options
author | Sven Gothel <sgothel@jausoft.com> | 2012-09-30 20:28:24 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2012-09-30 20:28:24 +0200 |
commit | e5c1e607d582d002256a07916aba71841744fb4d (patch) | |
tree | 4adf4c1ffe184a8c3145e725fb287bdd29b73cd0 /src | |
parent | ef4990ed1d07e7910f0a7a8b0d9e2cb424672b48 (diff) |
X11Util: Detailed closing information only in DEBUG mode, just print summary
Diffstat (limited to 'src')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java index 221939cde..103995a8d 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java @@ -190,8 +190,10 @@ public class X11Util implements ToolkitProperties { if( openDisplayList.size() > 0) { X11Util.dumpOpenDisplayConnections(); } - if( reusableDisplayList.size() > 0 || pendingDisplayList.size() > 0 ) { - X11Util.dumpPendingDisplayConnections(); + if(DEBUG) { + if( reusableDisplayList.size() > 0 || pendingDisplayList.size() > 0 ) { + X11Util.dumpPendingDisplayConnections(); + } } } @@ -317,11 +319,14 @@ public class X11Util implements ToolkitProperties { if( getMarkAllDisplaysUnclosable() ) { for(int i=0; i<pendingDisplayList.size(); i++) { final NamedDisplay ndpy = (NamedDisplay) pendingDisplayList.get(i); - final boolean closeAttempted = !openDisplayMap.containsKey(ndpy.getHandle()); - System.err.println("X11Util.closePendingDisplayConnections(): Closing ["+i+"]: "+ndpy+" - closeAttempted "+closeAttempted); + if(DEBUG) { + final boolean closeAttempted = !openDisplayMap.containsKey(ndpy.getHandle()); + System.err.println("X11Util.closePendingDisplayConnections(): Closing ["+i+"]: "+ndpy+" - closeAttempted "+closeAttempted); + } XCloseDisplay(ndpy.getHandle()); num++; } + System.err.println("X11Util.closePendingDisplayConnections(): Closed "+num+" pending display connections"); } } return num; |