src/solaris/classes/sun/awt/X11/XFramePeer.java

Print this page

        

@@ -207,11 +207,13 @@
             }
         );
     }
 
     public void setMaximizedBounds(Rectangle b) {
-        if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting maximized bounds to " + b);
+        if (insLog.isLoggable(PlatformLogger.FINE)) {
+            insLog.fine("Setting maximized bounds to " + b);
+        }
         if (b == null) return;
         maxBounds = new Rectangle(b);
         XToolkit.awtLock();
         try {
             XSizeHints hints = getHints();

@@ -224,11 +226,13 @@
             if (b.height != Integer.MAX_VALUE) {
                 hints.set_max_height(b.height);
             } else {
                 hints.set_max_height((int)XlibWrapper.DisplayHeight(XToolkit.getDisplay(), XlibWrapper.DefaultScreen(XToolkit.getDisplay())));
             }
-            if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
+            if (insLog.isLoggable(PlatformLogger.FINER)) {
+                insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
+            }
             XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData);
         } finally {
             XToolkit.awtUnlock();
         }
     }

@@ -255,25 +259,31 @@
         int changeIconic = changed & Frame.ICONIFIED;
         boolean iconic = (newState & Frame.ICONIFIED) != 0;
         stateLog.finer("Changing state, old state {0}, new state {1}(iconic {2})",
                        Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic));
         if (changeIconic != 0 && iconic) {
-            if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
+            if (stateLog.isLoggable(PlatformLogger.FINER)) {
+                stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
+            }
             XToolkit.awtLock();
             try {
                 int res = XlibWrapper.XIconifyWindow(XToolkit.getDisplay(), getShell(), getScreenNumber());
-                if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("XIconifyWindow returned " + res);
+                if (stateLog.isLoggable(PlatformLogger.FINER)) {
+                    stateLog.finer("XIconifyWindow returned " + res);
+                }
             }
             finally {
                 XToolkit.awtUnlock();
             }
         }
         if ((changed & ~Frame.ICONIFIED) != 0) {
             setExtendedState(newState);
         }
         if (changeIconic != 0 && !iconic) {
-            if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("DeIconifying " + this);
+            if (stateLog.isLoggable(PlatformLogger.FINER)) {
+                stateLog.finer("DeIconifying " + this);
+            }
             xSetVisible(true);
         }
     }
 
     void setExtendedState(int newState) {

@@ -295,11 +305,13 @@
         }
 
         final int newState = XWM.getWM().getState(this);
         int changed = state ^ newState;
         if (changed == 0) {
+            if (stateLog.isLoggable(PlatformLogger.FINER)) {
             stateLog.finer("State is the same: " + state);
+            }
             return;
         }
 
         int old_state = state;
         state = newState;

@@ -347,11 +359,13 @@
         XToolkit.awtLock();
         try {
             XWMHints hints = getWMHints();
             hints.set_flags((int)XUtilConstants.StateHint | hints.get_flags());
             hints.set_initial_state(wm_state);
-            if (stateLog.isLoggable(PlatformLogger.FINE)) stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
+            if (stateLog.isLoggable(PlatformLogger.FINE)) {
+                stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
+            }
             XlibWrapper.XSetWMHints(XToolkit.getDisplay(), getWindow(), hints.pData);
         }
         finally {
             XToolkit.awtUnlock();
         }