Author: olivier
Date: 2007-10-25 21:47:27 +0000 (Thu, 25 Oct 2007)
New Revision: 26198

Modified:
   xfwm4/trunk/src/client.c
Log:
Apply a patch from Andreas Lampersperger <[EMAIL PROTECTED]> to improve ICCCM 
compliance regarding synthetic ConfigureNotify event (Bug #3610)

Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c    2007-10-25 20:46:06 UTC (rev 26197)
+++ xfwm4/trunk/src/client.c    2007-10-25 21:47:27 UTC (rev 26198)
@@ -687,6 +687,11 @@
     TRACE ("configuring client \"%s\" (0x%lx) %s, type %u", c->name,
         c->window, flags & CFG_CONSTRAINED ? "constrained" : "not contrained", 
c->type);
 
+    px = c->x;
+    py = c->y;
+    pwidth = c->width;
+    pheight = c->height;
+
     if (mask & CWX)
     {
         if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING))
@@ -761,11 +766,6 @@
          && CONSTRAINED_WINDOW (c)
          && !((c->gravity == StaticGravity) && (c->x == 0) && (c->y == 0)))
     {
-        px = c->x;
-        py = c->y;
-        pwidth = c->width;
-        pheight = c->height;
-
         /* Keep fully visible only on resize */
         clientConstrainPos (c, (mask & (CWWidth | CWHeight)));
 
@@ -773,25 +773,42 @@
         {
             mask |= CWX;
         }
+        else
+        {
+            mask &= ~CWX;
+        }
+
         if (c->y != py)
         {
             mask |= CWY;
         }
+        else
+        {
+            mask &= ~CWY;
+        }
 
         if (c->width != pwidth)
         {
             mask |= CWWidth;
         }
+        else
+        {
+            mask &= ~CWWidth;
+        }
         if (c->height != pheight)
         {
             mask |= CWHeight;
         }
+        else
+        {
+            mask &= ~CWHeight;
+        }
     }
 
     clientConfigureWindows (c, wc, mask, flags);
     /*
 
-      We reparent to client window. According to the ICCCM spec, the
+      We reparent the client window. According to the ICCCM spec, the
       WM must send a senthetic event when the window is moved and not resized.
 
       But, since we reparent the window, we must also send a synthetic

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to