--- old/src/solaris/classes/sun/awt/X11/XWM.java 2013-03-20 14:41:54.000000000 +0400 +++ new/src/solaris/classes/sun/awt/X11/XWM.java 2013-03-20 14:41:54.000000000 +0400 @@ -148,7 +148,9 @@ XWM(int WMID) { this.WMID = WMID; initializeProtocols(); - if (log.isLoggable(PlatformLogger.FINE)) log.fine("Window manager: " + toString()); + if (log.isLoggable(PlatformLogger.FINE)) { + log.fine("Window manager: " + toString()); + } } int getID() { return WMID; @@ -252,7 +254,7 @@ * having a window manager running. I.e. it does not reparent * top level shells. */ - if (insLog.isLoggable(PlatformLogger.FINE)) { + if (insLog.isLoggable(PlatformLogger.FINER)) { insLog.finer("eXcursion means NO_WM"); } return true; @@ -270,7 +272,7 @@ long selection_owner = XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(), XAtom.get(selection_name).getAtom()); - if (insLog.isLoggable(PlatformLogger.FINE)) { + if (insLog.isLoggable(PlatformLogger.FINER)) { insLog.finer("selection owner of " + selection_name + " is " + selection_owner); } @@ -299,7 +301,7 @@ XToolkit.getDefaultRootWindow(), XConstants.CWEventMask, substruct.pData); - if (insLog.isLoggable(PlatformLogger.FINE)) { + if (insLog.isLoggable(PlatformLogger.FINER)) { insLog.finer("It looks like there is no WM thus NO_WM"); } } @@ -343,18 +345,26 @@ byte[] bytes = XlibWrapper.getStringBytes(getter.getData()); String id = new String(bytes); - log.finer("ENLIGHTENMENT_COMMS is " + id); + if (log.isLoggable(PlatformLogger.FINER)) { + log.finer("ENLIGHTENMENT_COMMS is " + id); + } // Parse WINID Pattern winIdPat = Pattern.compile("WINID\\s+(\\p{XDigit}{0,8})"); try { Matcher match = winIdPat.matcher(id); if (match.matches()) { - log.finest("Match group count: " + match.groupCount()); + if (log.isLoggable(PlatformLogger.FINEST)) { + log.finest("Match group count: " + match.groupCount()); + } String longId = match.group(1); - log.finest("Match group 1 " + longId); + if (log.isLoggable(PlatformLogger.FINEST)) { + log.finest("Match group 1 " + longId); + } long winid = Long.parseLong(longId, 16); - log.finer("Enlightenment communication window " + winid); + if (log.isLoggable(PlatformLogger.FINER)) { + log.finer("Enlightenment communication window " + winid); + } return winid; } else { log.finer("ENLIGHTENMENT_COMMS has wrong format"); @@ -654,7 +664,9 @@ try { int status = getter.execute(); boolean res = (status == XConstants.Success && getter.getActualType() != 0); - log.finer("Status getting XA_ICEWM_WINOPTHINT: " + !res); + if (log.isLoggable(PlatformLogger.FINER)) { + log.finer("Status getting XA_ICEWM_WINOPTHINT: " + !res); + } return !res || isNetWMName("IceWM"); } finally { getter.dispose(); @@ -816,7 +828,9 @@ } hints.set_flags(hints.get_flags() & ~mask); - 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.getWindow(), hints.pData); @@ -873,7 +887,9 @@ XAtomList decorDel = new XAtomList(); decorations = normalizeMotifDecor(decorations); - if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations)); + if (insLog.isLoggable(PlatformLogger.FINER)) { + insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations)); + } if ((decorations & MWMConstants.MWM_DECOR_TITLE) == 0) { decorDel.add(XA_OL_DECOR_HEADER); } @@ -890,7 +906,9 @@ insLog.finer("Deleting OL_DECOR"); XA_OL_DECOR_DEL.DeleteProperty(window); } else { - if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting OL_DECOR to " + decorDel); + if (insLog.isLoggable(PlatformLogger.FINER)) { + insLog.finer("Setting OL_DECOR to " + decorDel); + } XA_OL_DECOR_DEL.setAtomListProperty(window, decorDel); } } @@ -918,7 +936,9 @@ hints.set_functions(functions); hints.set_decorations(decorations); - if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("Setting MWM_HINTS to " + hints); + if (stateLog.isLoggable(PlatformLogger.FINER)) { + stateLog.finer("Setting MWM_HINTS to " + hints); + } window.setMWMHints(hints); } @@ -980,7 +1000,9 @@ * Make specified shell resizable. */ static void setShellResizable(XDecoratedPeer window) { - if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell resizable " + window); + if (insLog.isLoggable(PlatformLogger.FINE)) { + insLog.fine("Setting shell resizable " + window); + } XToolkit.awtLock(); try { Rectangle shellBounds = window.getShellBounds(); @@ -1010,8 +1032,10 @@ static void setShellNotResizable(XDecoratedPeer window, WindowDimensions newDimensions, Rectangle shellBounds, boolean justChangeSize) { - if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions + - ", shellBounds " + shellBounds +", just change size: " + justChangeSize); + if (insLog.isLoggable(PlatformLogger.FINE)) { + insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions + + ", shellBounds " + shellBounds +", just change size: " + justChangeSize); + } XToolkit.awtLock(); try { /* Fix min/max size hints at the specified values */ @@ -1142,7 +1166,9 @@ stateLog.finer("WithdrawnState"); return false; } else { - stateLog.finer("Window WM_STATE is " + wm_state); + if (stateLog.isLoggable(PlatformLogger.FINER)) { + stateLog.finer("Window WM_STATE is " + wm_state); + } } boolean is_state_change = false; if (e.get_atom() == XA_WM_STATE.getAtom()) { @@ -1151,7 +1177,9 @@ for (XStateProtocol proto : getProtocols(XStateProtocol.class)) { is_state_change |= proto.isStateChange(e); - stateLog.finest(proto + ": is state changed = " + is_state_change); + if (stateLog.isLoggable(PlatformLogger.FINEST)) { + stateLog.finest(proto + ": is state changed = " + is_state_change); + } } return is_state_change; } @@ -1303,7 +1331,9 @@ res = defaultInsets; } } - if (insLog.isLoggable(PlatformLogger.FINEST)) insLog.finest("WM guessed insets: " + res); + if (insLog.isLoggable(PlatformLogger.FINEST)) { + insLog.finest("WM guessed insets: " + res); + } return res; } /*