Window shading is broken

Bug #864478 reported by Sam Spilsbury
58
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
High
Sam Spilsbury
Compiz Core
Fix Released
High
Sam Spilsbury
Unity
Fix Released
High
Sam Spilsbury
compiz (Ubuntu)
Fix Released
Undecided
Unassigned
unity (Ubuntu)
Fix Released
High
Sam Spilsbury

Bug Description

Shading a window results in an invisible frame and rendering artefacts. Also, shading doesn't happen reliably (eg, pressing the keybinding will not shade some windows)

Testcase

edit /apps/gwd/titlebar_action to 'shade'
scroll up on a window titlebar

The window should not disappear

Related branches

Changed in compiz-core:
importance: Undecided → High
Changed in unity:
importance: Undecided → High
Changed in compiz-core:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in unity:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in compiz-core:
milestone: none → 0.9.6
Changed in unity:
milestone: none → 3.8.18
milestone: 3.8.18 → 4.22.0
Changed in compiz-core:
status: New → In Progress
Changed in unity:
status: New → In Progress
Changed in compiz-core:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in unity (Ubuntu):
status: New → In Progress
Changed in compiz-core:
status: In Progress → Fix Committed
Changed in compiz:
status: New → Fix Committed
assignee: nobody → Sam Spilsbury (smspillaz)
importance: Undecided → High
Changed in unity:
milestone: 4.22.0 → 4.24.0
Changed in unity:
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
affects: unity (Ubuntu) → compiz (Ubuntu)
description: updated
Changed in compiz:
status: Fix Committed → Fix Released
Changed in compiz-core:
status: Fix Committed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Sam Spilsbury (smspillaz) wrote :
Download full text (5.2 KiB)

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->save...

Read more...

Changed in unity:
milestone: 4.24.0 → 4.26.0
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.6+bzr20110929-0ubuntu5

---------------
compiz (1:0.9.6+bzr20110929-0ubuntu5) oneiric-proposed; urgency=low

  * debian/patches/fix-864330.patch:
    - fix windows which can have towed moving (LP: #864330)
  * debian/patches/fix-864478.patch:
    - Window shading is broken (LP: #864478)

compiz (1:0.9.6+bzr20110929-0ubuntu4) oneiric-proposed; urgency=low

  * debian/control:
    - don't suggest nvidia-glx, it's part of the old initial packaging
      and probably a bad hint on non nvidia system (LP: #844218)
  * Cherry-pick upstream patches:
    - Windows should not automatically be focused when opened if the focus
      is on another application (LP: #748840)
    - Launcher - If a spread contains minimised windows, when the spread
      exits, the minimised windows momentarily appear on the desktop
      before disappearing (LP: #863328)
    - reproducible stacking bug in compiz (LP: #869316)
    - Click-dragging a window that's stacked above a fullscreen window will
      cause it to go underneath the fullscreen window (LP: #869919)
    - sometimes the keyboard input doesn't go to the apparently focussed
      dialog (LP: #869967)
    - Opening mumble can cause it to be stacked above the dash if you
      open the dash at the same time (LP: #865863)
    - Sometimes configure events are missed and windows move slow as a result
      (LP: #866752)
    - Workaround ubuntu desktop unity. Mouse at the left side doesn't reveal
      launcher (LP: #832150)
 -- Didier Roche <email address hidden> Wed, 12 Oct 2011 10:44:49 +0200

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jimmy Merrild Krag (beruic) wrote :

I think I still have this issue. Has the fix hit the repos?
I can't find that path mentioned in the description, but when I use Ctrl+Alt+S there's a frame left upon shading.
I'm on Oneiric.

Revision history for this message
Jimmy Merrild Krag (beruic) wrote :

Here's a screenshot of how my windows look in shaded mode.

Revision history for this message
Ignacy Gawędzki (iazz) wrote :

I have the visible frame in shaded windows too, as beruic. Oneiric and compiz 1:0.9.6+bzr20110929-0ubuntu5.

Revision history for this message
soro2005 (soro) wrote :

I also have the same frame, also compiz 1:0.9.6+bzr20110929-0ubuntu5, unity 4.24.0-0ubuntu2b1

Revision history for this message
Michael Crozier (crozierm) wrote :

I have this problem also:

ii compiz 1:0.9.6+bzr20110929-0ubuntu5 OpenGL window and compositing manager
ii compiz-core 1:0.9.6+bzr20110929-0ubuntu5 OpenGL window and compositing manager
ii compiz-gnome 1:0.9.6+bzr20110929-0ubuntu5 OpenGL window and compositing manager - GNOME window decorator
ii compiz-plugins 1:0.9.6+bzr20110929-0ubuntu5 OpenGL window and compositing manager - plugins
ii compiz-plugins-default 1:0.9.6+bzr20110929-0ubuntu5 OpenGL window and compositing manager - default plugins
ii

Revision history for this message
Michael Crozier (crozierm) wrote :

Does somebody know if the updated Compiz packages (4.26) be released for 11.10?

If not, I must downgrade to 11.04 or switch to something different. I've got 13 years of muscle memory telling me that I can shade windows. Unfortunately, minimized xterms can be very difficult to find in this version of Unity and metacity doesn't have the customization options I enjoy.

Thanks

Revision history for this message
Derek White (d-man97) wrote :

Found http://ubuntuforums.org/showthread.php?t=1870006 and it lead me to the change log for '1:0.9.6+bzr20110929-0ubuntu6' in oneiric-proposed (pre-released updates):

* Add some upstream missing bits from previous fixes:
    - debian/patches/fix-864330.patch
    - debian/patches/fix-864478.patch

A poster on the thread also reports that the oneiric-proposed version DOES fix the issue for them. Seems like there was a slight problem with the patch that has since been fixed.

Revision history for this message
Ian Molton (ian-mnementh) wrote :

Fix seems to work. Thanks guys!

Revision history for this message
Michael Crozier (crozierm) wrote :

Thanks, I didn't know about the "proposed" repository.

deb http://us.archive.ubuntu.com/ubuntu/ oneiric-proposed restricted main multiverse universe

I installed the compiz and the problem is solved.

Excellent!

description: updated
Changed in unity (Ubuntu):
status: New → Invalid
Changed in unity (Ubuntu):
status: Invalid → Fix Released
assignee: nobody → Sam Spilsbury (smspillaz)
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.