From e5c1e607d582d002256a07916aba71841744fb4d Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Sun, 30 Sep 2012 20:28:24 +0200
Subject: X11Util: Detailed closing information only in DEBUG mode, just print
 summary

---
 .../classes/jogamp/nativewindow/x11/X11Util.java            | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'src/nativewindow/classes/jogamp')

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;
-- 
cgit v1.2.3