Pending follow-up fix pending verification

=== modified file 'debian/patches/fix-864478.patch'
--- debian/patches/fix-864478.patch     2011-10-12 10:06:03 +0000
+++ debian/patches/fix-864478.patch     2011-10-17 07:02:55 +0000
@@ -1,8 +1,8 @@
 === modified file 'plugins/decor/src/decor.cpp'
 Index: compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp
 ===================================================================
---- compiz-0.9.6+bzr20110929.orig/plugins/decor/src/decor.cpp  2011-10-12 
16:58:15.358820188 +0800
-+++ compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp       2011-10-12 
16:58:26.894877391 +0800
+--- compiz-0.9.6+bzr20110929.orig/plugins/decor/src/decor.cpp  2011-09-29 
14:53:38.000000000 +0800
++++ compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp       2011-10-17 
15:01:40.431183993 +0800
 @@ -189,8 +189,6 @@
      if (wd &&
        wd->decor->type == WINDOW_DECORATION_TYPE_PIXMAP)
@@ -12,10 +12,86 @@
        CompRect box;
        GLTexture::MatrixList ml (1);
        mask |= PAINT_WINDOW_BLEND_MASK;
+@@ -738,9 +736,14 @@
+     for (i = 0; i < wd->nQuad; i++)
+     {
+       int x, y;
++      unsigned int width = window->size ().width ();
++      unsigned int height = window->size ().height ();
++
++      if (window->shaded ())
++          height = 0;
+ 
+-      computeQuadBox (&wd->decor->quad[i], window->size ().width (),
+-                      window->size ().height (),
++      computeQuadBox (&wd->decor->quad[i], width,
++                      height,
+                       &x1, &y1, &x2, &y2, &sx, &sy);
+ 
+       x = window->geometry ().x ();

This ensures that the decoration size is correctly calculated when the
window is shaded, so that you don't get a full size decoration for a
shaded window


+@@ -1995,37 +1998,34 @@
+ void
+ DecorWindow::stateChangeNotify (unsigned int lastState)
+ {
+-    if (!update (true))
++    if (wd && wd->decor)
+     {
+-      if (wd && wd->decor)
+-      {
+-          int oldShiftX = shiftX ();
+-          int oldShiftY = shiftY ();
+-          int moveDx, moveDy;
++      int oldShiftX = shiftX ();
++      int oldShiftY = shiftY ();
++      int moveDx, moveDy;
+ 
+-          if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
+-              window->setWindowFrameExtents (&wd->decor->maxBorder,
+-                                             &wd->decor->maxInput);
+-          else
+-              window->setWindowFrameExtents (&wd->decor->border,
+-                                             &wd->decor->input);
++      if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
++          window->setWindowFrameExtents (&wd->decor->maxBorder,
++                                         &wd->decor->maxInput);
++      else
++          window->setWindowFrameExtents (&wd->decor->border,
++                                         &wd->decor->input);
+ 
+-          /* Since we immediately update the frame extents, we must
+-           * also update the stored saved window geometry in order
+-           * to prevent the window from shifting back too far once
+-           * unmaximized */
++      /* Since we immediately update the frame extents, we must
++       * also update the stored saved window geometry in order
++       * to prevent the window from shifting back too far once
++       * unmaximized */
+ 
+-          moveDx = shiftX () - oldShiftX;
+-          moveDy = shiftY () - oldShiftY;
++      moveDx = shiftX () - oldShiftX;
++      moveDy = shiftY () - oldShiftY;
+ 
+-          if (window->saveMask () & CWX)
+-              window->saveWc ().x += moveDx;
++      if (window->saveMask () & CWX)
++          window->saveWc ().x += moveDx;
+ 
+-          if (window->saveMask () & CWY)
+-              window->saveWc ().y += moveDy;
++      if (window->saveMask () & CWY)
++          window->saveWc ().y += moveDy;
+ 
+-          updateFrame ();
+-      }
++      updateFrame ();
+     }
+ 

This ensures that the decoration image can be updated even if there was
no change to the window size (happens in the case of shading a maximized
window

+     window->stateChangeNotify (lastState);
 Index: compiz-0.9.6+bzr20110929/src/event.cpp
 ===================================================================
---- compiz-0.9.6+bzr20110929.orig/src/event.cpp        2011-10-12 
16:58:15.434820565 +0800
-+++ compiz-0.9.6+bzr20110929/src/event.cpp     2011-10-12 16:58:26.898877416 
+0800
+--- compiz-0.9.6+bzr20110929.orig/src/event.cpp        2011-10-17 
14:59:58.882680439 +0800
++++ compiz-0.9.6+bzr20110929/src/event.cpp     2011-10-17 15:00:01.278692325 
+0800
 @@ -1837,7 +1837,7 @@
           * and the passive button grabs and then we will
           * get the DestroyNotify later and change the focus
@@ -44,8 +120,8 @@
                    state &= ~CompWindowStateDemandsAttentionMask;
 Index: compiz-0.9.6+bzr20110929/src/window.cpp
 ===================================================================
---- compiz-0.9.6+bzr20110929.orig/src/window.cpp       2011-10-12 
16:58:15.398820386 +0800
-+++ compiz-0.9.6+bzr20110929/src/window.cpp    2011-10-12 16:59:39.339236630 
+0800
+--- compiz-0.9.6+bzr20110929.orig/src/window.cpp       2011-10-17 
15:00:00.514688526 +0800
++++ compiz-0.9.6+bzr20110929/src/window.cpp    2011-10-17 15:00:01.282692335 
+0800
 @@ -604,7 +604,7 @@
        break;
      }
@@ -236,7 +312,7 @@
  
  
      if (serverFrame)
-@@ -4241,7 +4278,7 @@
+@@ -4243,7 +4280,7 @@
      if (overrideRedirect () || !priv->managed)
        return;
  
@@ -245,7 +321,7 @@
      {
        windowNotify (CompWindowNotifyShade);
  
-@@ -4649,20 +4686,10 @@
+@@ -4651,20 +4688,10 @@
        if (serverFrame)
            XMapWindow (screen->dpy (), serverFrame);
  
@@ -267,7 +343,7 @@
  
      window->windowNotify (CompWindowNotifyShow);
  
-@@ -6288,12 +6315,7 @@
+@@ -6290,12 +6317,7 @@
      priv->updateIconGeometry ();
  
      if (priv->shaded)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/864478

Title:
  Window shading is broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/compiz/+bug/864478/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to