Window shading is broken
Bug #864478 reported by
Sam Spilsbury
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/
scroll up on a window titlebar
The window should not disappear
Related branches
lp:~compiz-team/compiz-core/compiz-core.fix_864478
- Robert Carr (community): Approve
-
Diff: 299 lines (+78/-54)3 files modifiedplugins/decor/src/decor.cpp (+7/-6)
src/event.cpp (+3/-2)
src/window.cpp (+68/-46)
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 |
Changed in unity: | |
milestone: | 4.24.0 → 4.26.0 |
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.
Pending follow-up fix pending verification
=== modified file 'debian/ patches/ fix-864478. patch' patches/ fix-864478. patch 2011-10-12 10:06:03 +0000 patches/ fix-864478. patch 2011-10-17 07:02:55 +0000 decor/src/ decor.cpp' 0.9.6+bzr201109 29/plugins/ decor/src/ decor.cpp ======= ======= ======= ======= ======= ======= ======= ======= ===== 0.9.6+bzr201109 29.orig/ plugins/ decor/src/ decor.cpp 2011-10-12 16:58:15.358820188 +0800 0.9.6+bzr201109 29/plugins/ decor/src/ decor.cpp 2011-10-12 16:58:26.894877391 +0800 0.9.6+bzr201109 29.orig/ plugins/ decor/src/ decor.cpp 2011-09-29 14:53:38.000000000 +0800 0.9.6+bzr201109 29/plugins/ decor/src/ decor.cpp 2011-10-17 15:01:40.431183993 +0800 DECORATION_ TYPE_PIXMAP) :MatrixList ml (1); BLEND_MASK; >quad[i] , window->size ().width (), >quad[i] , width,
--- debian/
+++ debian/
@@ -1,8 +1,8 @@
=== modified file 'plugins/
Index: compiz-
======
---- compiz-
-+++ compiz-
+--- compiz-
++++ compiz-
@@ -189,8 +189,6 @@
if (wd &&
wd->decor->type == WINDOW_
@@ -12,10 +12,86 @@
CompRect box;
GLTexture:
mask |= PAINT_WINDOW_
+@@ -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-
+- window->size ().height (),
++ computeQuadBox (&wd->decor-
++ 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 @@ :stateChangeNot ify (unsigned int lastState) >setWindowFrame Extents (&wd->decor- >maxBorder, >maxInput) ; >setWindowFrame Extents (&wd->decor- >border, >setWindowFrame Extents (&wd->decor- >maxBorder, >maxInput) ; >setWindowFrame Extents (&wd->decor- >border,
+ void
+ DecorWindow:
+ {
+- 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-
+- &wd->decor-
+- else
+- window-
+- &wd->decor->input);
++ if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
++ window-
++ &wd->decor-
++ else
++ window-
++ &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...