Merge lp://qastaging/~vanvugt/compiz/fix-1046661 into lp://qastaging/compiz/0.9.8

Proposed by Daniel van Vugt
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3349
Merged at revision: 3346
Proposed branch: lp://qastaging/~vanvugt/compiz/fix-1046661
Merge into: lp://qastaging/compiz/0.9.8
Diff against target: 171 lines (+77/-36)
5 files modified
plugins/opengl/src/fsregion/fsregion.cpp (+2/-2)
plugins/opengl/src/fsregion/fsregion.h (+6/-4)
plugins/opengl/src/fsregion/tests/test-fsregion.cpp (+19/-0)
plugins/opengl/src/paint.cpp (+34/-30)
tests/manual/Unredirect.txt (+16/-0)
To merge this branch: bzr merge lp://qastaging/~vanvugt/compiz/fix-1046661
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
jenkins (community) continuous-integration Approve
Review via email: mp+123026@code.qastaging.launchpad.net

Commit message

Fixed: Windows with an alpha-channel, like gnome-terminal, were not being
considered as possibly covering fullscreen windows. But they most certainly
can. This ensures such RGBA windows are visible if they're stacked above a
fullscreen window. (LP: #1046661)
.

Description of the change

Fixed: Windows with an alpha-channel, like gnome-terminal, were not being
considered as possibly covering fullscreen windows. But they most certainly
can. This ensures such RGBA windows are visible if they're stacked above a
fullscreen window. (LP: #1046661)

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

!(flags & (Desktop | Alpha)

That can be expressed as a temporary rather than in a compound if statement

const bool ignoreWindow = (flags & (Desktop | Alpha)

119 + /*
120 + * Alpha windows (status == false) can cover/cancel fullscreen
121 + * unredirected windows. But they can't be unredirected themselves.
122 + * I wonder if this is sensible as some games may use fullscreen
123 + * RGBA (alpha) windows that are fully opaque and need unredirect.
124 + */

This comment is confusing. We're checking whether or not the window has an rgba visual (eg, w->alpha () not whether or not it failed to paint (as status == false) would indicate to me.

Also, the default visual for most windows would be an RGB24 visual, so I don't think the concern is too much. (And we wouldn't be able to detect it anyways, as an RGBA visual just means a client is at liberty to have alpha values in its backing pixmap, which we must blend).

I'm also a bit confused as to why it matters that the window has an alpha channel as to whether or not a fullscreen window underneath it is unredirected. Shouldn't the fullscreen window underneath always be unredirected if there is some other window that is occluding it?

review: Needs Information
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> Shouldn't the fullscreen window underneath always be
> unredirected if there is some other window that is occluding it?

Correction: That should read

"Shouldn't the fullscreen window underneath always be redirected if there is some other window that is occluding it"

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

!(flags & (Desktop | Alpha) is clearer, I think. Programmers think in logic, not words. We don't need to be translating clear logic into extraneous English. It complicates the thought process. Also, "ignoreWindow" is not accurate because it's not the only condition for ignoring a window.

Yeah, the comment is slightly out-dated still. It belongs next to some code that's not there any more. But technically it's still true. status is false for alpha windows (and other cases too).

Alpha "matters" for FullscreenRegion, only because we don't want to accidentally unredirect a translucent fullscreen window. You are right that alpha does not matter for the non-fullscreen windows.

3349. By Daniel van Vugt

Clarify comment per smspillaz suggestion.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Okay, I'm good with it now after discussing.

Noted that this proposal doesn't deal with the issue of "not counting" windows that are fully-transparent or not painted at all on top of fullscreen windows. This case should be dealt with later.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches