changeset 41393:ebc8d972cd3f

8161910: [PIT] regression: HW/LW mixing seems broken on Unity Reviewed-by: azvegint
author ssadetsky
date Fri, 23 Sep 2016 10:36:32 +0300
parents ce5748c8192a
children da0318151636
files jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java	Fri Sep 23 09:14:29 2016 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java	Fri Sep 23 10:36:32 2016 +0300
@@ -325,7 +325,8 @@
                 if (!isEmbedded() && !isTargetUndecorated()) {
                     lastKnownInsets.put(getClass(), in);
                 }
-                if (!in.equals(dimensions.getInsets())) {
+                if (!in.equals(dimensions.getInsets()) ||
+                                                !dimensions.isClientSizeSet()) {
                     handleCorrectInsets(in);
                 }
                 insets_corrected = true;
@@ -374,6 +375,9 @@
             } else { /* reparented to WM frame, figure out our insets */
                 setReparented(true);
                 insets_corrected = false;
+                if (XWM.getWMID() == XWM.UNITY_COMPIZ_WM) {
+                    return;
+                }
 
                 // Check if we have insets provided by the WM
                 Insets correctWM = getWMSetInsets(null);
@@ -405,7 +409,7 @@
                     }
                 }
 
-                if (correctWM != null && XWM.getWMID() != XWM.UNITY_COMPIZ_WM) {
+                if (correctWM != null) {
                     handleCorrectInsets(correctWM);
                 }
             }