Merge lp:~compiz-team/compiz/compiz.fix_1012956 into lp:compiz/0.9.8
Proposed by
Sam Spilsbury
Status: | Superseded |
---|---|
Proposed branch: | lp:~compiz-team/compiz/compiz.fix_1012956 |
Merge into: | lp:compiz/0.9.8 |
Diff against target: |
46 lines (+23/-4) 1 file modified
plugins/decor/src/decor.cpp (+23/-4) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/compiz.fix_1012956 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Needs Fixing | ||
Tim Penhey | Pending | ||
Review via email: mp+110722@code.launchpad.net |
This proposal supersedes a proposal from 2012-06-14.
This proposal has been superseded by a proposal from 2012-06-18.
Description of the change
Check if the window would actually paint before painting the shadow, since
it is possible that another plugin could be inhibiting paint of the dock window.
Fixes (LP: #1012956)
Unblocks: https:/
To post a comment you must log in.
I'm going to be pedantic here...
> bool isDock = w->type () & CompWindowTypeD ockMask;
This looks fine.
However...
> bool invisible = w->invisible ();
> invisible |= w->destroyed ();
> if (isDock && !invisible)
Seems a bit more weird. Primarily because the local invisible variable reflects the window invisible state, which is fine, but then it becomes "invisible or destroyed", which isn't what the variable reflects.
As an aside, this value is then negated in the if statement.
How about...
bool drawShadow = !w->invisible ();
if (w->destroyed ())
drawShadow = false;
if (isDock && drawShadow)
// ...
Having booleans expressed in the positive are simpler to follow.
bool drawShadow = !(w->invisible () || w-> destroyed ());
Also seems simple enough to follow.
I can't really comment on the internals of the method though.
How expensive is the glPaint call?