< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java

Print this page

        

@@ -299,12 +299,15 @@
         }
         return wm_set_insets;
     }
 
     private void resetWMSetInsets() {
+        if (XWM.getWMID() != XWM.UNITY_COMPIZ_WM) {
+            currentInsets = new Insets(0, 0, 0, 0);
         wm_set_insets = null;
     }
+    }
 
     public void handlePropertyNotify(XEvent xev) {
         super.handlePropertyNotify(xev);
 
         XPropertyEvent ev = xev.get_xproperty();

@@ -350,11 +353,11 @@
                     } else {
                         // recalculate dimensions when window is just created
                         // and the initially guessed insets were wrong
                         handleCorrectInsets(in);
                     }
-                } else if (!dimensions.isClientSizeSet()) {
+                } else if (!insets_corrected || !dimensions.isClientSizeSet()) {
                     insets_corrected = true;
                     // initial insets were guessed correctly. Re-request
                     // frame bounds because they may be changed by WM if the
                     // initial window position overlapped desktop's toolbars.
                     // This should initiate the final ConfigureNotify upon which

@@ -906,11 +909,10 @@
         setResizable(winAttr.initialResizability);
     }
     public void setResizable(boolean resizable) {
         int fs = winAttr.functions;
         if (!isResizable() && resizable) {
-            currentInsets = new Insets(0, 0, 0, 0);
             resetWMSetInsets();
             if (!isEmbedded()) {
                 setReparented(false);
             }
             winAttr.isResizable = resizable;

@@ -920,11 +922,10 @@
                 fs |= (MWMConstants.MWM_FUNC_RESIZE | MWMConstants.MWM_FUNC_MAXIMIZE);
             }
             winAttr.functions = fs;
             XWM.setShellResizable(this);
         } else if (isResizable() && !resizable) {
-            currentInsets = new Insets(0, 0, 0, 0);
             resetWMSetInsets();
             if (!isEmbedded()) {
                 setReparented(false);
             }
             winAttr.isResizable = resizable;
< prev index next >