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

Print this page

        

@@ -76,11 +76,11 @@
         applyGuessedInsets();
 
         Rectangle bounds = (Rectangle)params.get(BOUNDS);
         dimensions = new WindowDimensions(bounds, getRealInsets(), false);
         params.put(BOUNDS, dimensions.getClientRect());
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("Initial dimensions {0}", dimensions);
         }
 
         // Deny default processing of these events on the shell - proxy will take care of
         // them instead

@@ -179,11 +179,11 @@
                            compAccessor.getBackground(target),
                            compAccessor.getFont(target));
     }
 
     public void setTitle(String title) {
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("Title is " + title);
         }
         winAttr.title = title;
         updateWMName();
     }

@@ -229,11 +229,11 @@
         super.handleFocusEvent(xev);
         XFocusChangeEvent xfe = xev.get_xfocus();
 
         // If we somehow received focus events forward it instead to proxy
         // FIXME: Shouldn't we instead check for inferrior?
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
             focusLog.finer("Received focus event on shell: " + xfe);
         }
 //         focusProxy.xRequestFocus();
    }
 

@@ -273,11 +273,11 @@
             wm_set_insets = XWM.getInsetsFromExtents(getWindow());
         } else {
             wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom);
         }
 
-        if (insLog.isLoggable(PlatformLogger.FINER)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
             insLog.finer("FRAME_EXTENTS: {0}", wm_set_insets);
         }
 
         if (wm_set_insets != null) {
             wm_set_insets = copy(wm_set_insets);

@@ -302,11 +302,11 @@
 
     long reparent_serial = 0;
 
     public void handleReparentNotifyEvent(XEvent xev) {
         XReparentEvent  xe = xev.get_xreparent();
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine(xe.toString());
         }
         reparent_serial = xe.get_serial();
         XToolkit.awtLock();
         try {

@@ -343,11 +343,11 @@
                 insets_corrected = false;
 
                 // Check if we have insets provided by the WM
                 Insets correctWM = getWMSetInsets(null);
                 if (correctWM != null) {
-                    if (insLog.isLoggable(PlatformLogger.FINER)) {
+                    if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
                         insLog.finer("wm-provided insets {0}", correctWM);
                     }
                     // If these insets are equal to our current insets - no actions are necessary
                     Insets dimInsets = dimensions.getInsets();
                     if (correctWM.equals(dimInsets)) {

@@ -358,11 +358,11 @@
                         return;
                     }
                 } else {
                     correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent());
 
-                    if (insLog.isLoggable(PlatformLogger.FINER)) {
+                    if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
                         if (correctWM != null) {
                             insLog.finer("correctWM {0}", correctWM);
                         } else {
                             insLog.finer("correctWM insets are not available, waiting for configureNotify");
                         }

@@ -384,11 +384,11 @@
             /*
              * Ok, now see if we need adjust window size because
              * initial insets were wrong (most likely they were).
              */
             Insets correction = difference(correctWM, currentInsets);
-            if (insLog.isLoggable(PlatformLogger.FINEST)) {
+            if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
                 insLog.finest("Corrention {0}", correction);
             }
             if (!isNull(correction)) {
                 currentInsets = copy(correctWM);
                 applyGuessedInsets();

@@ -396,11 +396,11 @@
                 //Fix for 6318109: PIT: Min Size is not honored properly when a
                 //smaller size is specified in setSize(), XToolkit
                 //update minimum size hints
                 updateMinSizeHints();
             }
-            if (insLog.isLoggable(PlatformLogger.FINER)) {
+            if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
                 insLog.finer("Dimensions before reparent: " + dimensions);
             }
 
             dimensions.setInsets(getRealInsets());
             insets_corrected = true;

@@ -471,11 +471,11 @@
     }
 
     public Insets getInsets() {
         Insets in = copy(getRealInsets());
         in.top += getMenuBarHeight();
-        if (insLog.isLoggable(PlatformLogger.FINEST)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
             insLog.finest("Get insets returns {0}", in);
         }
         return in;
     }
 

@@ -501,11 +501,11 @@
     // Coordinates are that of the target
     // Called only on Toolkit thread
     public void reshape(WindowDimensions newDimensions, int op,
                         boolean userReshape)
     {
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("Reshaping " + this + " to " + newDimensions + " op " + op + " user reshape " + userReshape);
         }
         if (userReshape) {
             // We handle only userReshape == true cases. It means that
             // if the window manager or any other part of the windowing

@@ -522,11 +522,11 @@
             newDimensions = new WindowDimensions(newBounds, insets, newDimensions.isClientSizeSet());
         }
         XToolkit.awtLock();
         try {
             if (!isReparented() || !isVisible()) {
-                if (insLog.isLoggable(PlatformLogger.FINE)) {
+                if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
                     insLog.fine("- not reparented({0}) or not visible({1}), default reshape",
                            Boolean.valueOf(isReparented()), Boolean.valueOf(visible));
                 }
 
                 // Fix for 6323293.

@@ -630,11 +630,11 @@
           default:
               dims.setLocation(x, y);
               dims.setSize(width, height);
               break;
         }
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("For the operation {0} new dimensions are {1}",
                         operationToString(operation), dims);
         }
 
         reshape(dims, operation, userReshape);

@@ -663,11 +663,11 @@
 
     boolean no_reparent_artifacts = false;
     public void handleConfigureNotifyEvent(XEvent xev) {
         assert (SunToolkit.isAWTLockHeldByCurrentThread());
         XConfigureEvent xe = xev.get_xconfigure();
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("Configure notify {0}", xe);
         }
 
         // XXX: should really only consider synthetic events, but
         if (isReparented()) {

@@ -702,11 +702,11 @@
          * possibly MWM as well).  If we haven't been reparented yet
          * this is just the WM shuffling us into position.  Ignore
          * it!!!! or we wind up in a bogus location.
          */
         int runningWM = XWM.getWMID();
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("reparented={0}, visible={1}, WM={2}, decorations={3}",
                         isReparented(), isVisible(), runningWM, getDecorations());
         }
         if (!isReparented() && isVisible() && runningWM != XWM.NO_WM
                 &&  !XWM.isNonReparentingWM()

@@ -716,11 +716,11 @@
         }
         //Last chance to correct insets
         if (!insets_corrected && getDecorations() != XWindowAttributesData.AWT_DECOR_NONE) {
             long parent = XlibUtil.getParentWindow(window);
             Insets correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null;
-            if (insLog.isLoggable(PlatformLogger.FINER)) {
+            if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
                 if (correctWM != null) {
                     insLog.finer("Configure notify - insets : " + correctWM);
                 } else {
                     insLog.finer("Configure notify - insets are still not available");
                 }

@@ -756,11 +756,11 @@
                 case XWM.METACITY_WM:
                 case XWM.MUTTER_WM:
                 case XWM.SAWFISH_WM:
                 {
                     Point xlocation = queryXLocation();
-                    if (log.isLoggable(PlatformLogger.FINE)) {
+                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
                         log.fine("New X location: {0}", xlocation);
                     }
                     if (xlocation != null) {
                         newLocation = xlocation;
                     }

@@ -775,11 +775,11 @@
                 new WindowDimensions(newLocation,
                 new Dimension(xe.get_width(), xe.get_height()),
                 copy(currentInsets),
                 true);
 
-        if (insLog.isLoggable(PlatformLogger.FINER)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
             insLog.finer("Insets are {0}, new dimensions {1}",
                      currentInsets, newDimensions);
         }
 
         checkIfOnNewScreen(newDimensions.getBounds());

@@ -813,11 +813,11 @@
         checkShellRectSize(shellRect);
         checkShellRectPos(shellRect);
     }
 
     public void setShellBounds(Rectangle rec) {
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("Setting shell bounds on " + this + " to " + rec);
         }
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);

@@ -827,11 +827,11 @@
         finally {
             XToolkit.awtUnlock();
         }
     }
     public void setShellSize(Rectangle rec) {
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("Setting shell size on " + this + " to " + rec);
         }
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);

@@ -840,11 +840,11 @@
         finally {
             XToolkit.awtUnlock();
         }
     }
     public void setShellPosition(Rectangle rec) {
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
+        if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
             insLog.fine("Setting shell position on " + this + " to " + rec);
         }
         XToolkit.awtLock();
         try {
             updateSizeHints(rec.x, rec.y, rec.width, rec.height);

@@ -942,11 +942,11 @@
         try {
             if (configure_seen) {
                 return toGlobal(0,0);
             } else {
                 Point location = target.getLocation();
-                if (insLog.isLoggable(PlatformLogger.FINE)) {
+                if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
                     insLog.fine("getLocationOnScreen {0} not reparented: {1} ",
                                 this, location);
                 }
                 return location;
             }

@@ -982,11 +982,11 @@
     int getFunctions() {
         return winAttr.functions;
     }
 
     public void setVisible(boolean vis) {
-        if (log.isLoggable(PlatformLogger.FINER)) {
+        if (log.isLoggable(PlatformLogger.Level.FINER)) {
             log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
         }
         if (vis && !isVisible()) {
             XWM.setShellDecor(this);
             super.setVisible(vis);

@@ -1035,11 +1035,11 @@
             }
         }
     }
 
     private void handleWmTakeFocus(XClientMessageEvent cl) {
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
             focusLog.fine("WM_TAKE_FOCUS on {0}", this);
         }
         requestWindowFocus(cl.get_data(1), true);
     }
 

@@ -1050,15 +1050,15 @@
     protected void requestXFocus(long time, boolean timeProvided) {
         // We have proxied focus mechanism - instead of shell the focus is held
         // by "proxy" - invisible mapped window. When we want to set X input focus to
         // toplevel set it on proxy instead.
         if (focusProxy == null) {
-            if (focusLog.isLoggable(PlatformLogger.WARNING)) {
+            if (focusLog.isLoggable(PlatformLogger.Level.WARNING)) {
                 focusLog.warning("Focus proxy is null for " + this);
             }
         } else {
-            if (focusLog.isLoggable(PlatformLogger.FINE)) {
+            if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                 focusLog.fine("Requesting focus to proxy: " + focusProxy);
             }
             if (timeProvided) {
                 focusProxy.xRequestFocus(time);
             } else {

@@ -1148,11 +1148,11 @@
         // If this is Frame or Dialog we can't assure focus request success - but we still can try
         // If this is Window and its owner Frame is active we can be sure request succedded.
         Window focusedWindow = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusedWindow();
         Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow);
 
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
             focusLog.finer("Current window is: active={0}, focused={1}",
                        Boolean.valueOf(target == activeWindow),
                        Boolean.valueOf(target == focusedWindow));
         }
 

@@ -1175,24 +1175,24 @@
                 focusLog.fine("Focus is on child window - transfering it back to the owner");
                 handleWindowFocusInSync(-1);
                 return true;
             }
             Window realNativeFocusedWindow = XWindowPeer.getNativeFocusedWindow();
-            if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+            if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
                 focusLog.finest("Real native focused window: " + realNativeFocusedWindow +
                             "\nKFM's focused window: " + focusedWindow);
             }
 
             // A workaround for Metacity. See 6522725, 6613426, 7147075.
             if (target == realNativeFocusedWindow && XWM.getWMID() == XWM.METACITY_WM) {
-                if (focusLog.isLoggable(PlatformLogger.FINE)) {
+                if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                     focusLog.fine("The window is already natively focused.");
                 }
                 return true;
             }
         }
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
             focusLog.fine("Requesting focus to " + (this == toFocus ? "this window" : toFocus));
         }
 
         if (timeProvided) {
             toFocus.requestXFocus(time);