Merge lp:~sjakthol/compiz/fix-776435 into lp:compiz/0.9.10

Proposed by Sami Jaktholm
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3765
Merged at revision: 3766
Proposed branch: lp:~sjakthol/compiz/fix-776435
Merge into: lp:compiz/0.9.10
Diff against target: 15 lines (+4/-1)
1 file modified
src/window.cpp (+4/-1)
To merge this branch: bzr merge lp:~sjakthol/compiz/fix-776435
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Sam Spilsbury Approve
Review via email: mp+175739@code.launchpad.net

Commit message

Bias the current viewport in addWindowSizeChanges.

If window is visible in the current viewport, use that viewport when
calculating geometries in addWindowSizeChanges. Otherwise the current method
is used.

This way visible windows are maximized in the current viewport.
However, offscreen windows won't jump back to the active viewport if window
maximizes by itself or addWindowSizeChanges is called for some other reason.

Description of the change

I've been using this for few days and haven't seen anything out of place. Windows don't seem to be jumping around like with the last fix for this bug.

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

This makes sense to me - anybody else got any other opinions?

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good to me.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
MC Return (mc-return) wrote :

Yippie !!!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/window.cpp'
2--- src/window.cpp 2013-07-19 04:15:01 +0000
3+++ src/window.cpp 2013-07-19 06:39:23 +0000
4@@ -3553,7 +3553,10 @@
5 int mask = 0;
6 CompPoint viewport;
7
8- screen->viewportForGeometry (old, viewport);
9+ if (old.intersects (CompRect (0, 0, screen->width (), screen->height ())))
10+ viewport = screen->vp ();
11+ else
12+ screen->viewportForGeometry (old, viewport);
13
14 int x = (viewport.x () - screen->vp ().x ()) * screen->width ();
15 int y = (viewport.y () - screen->vp ().y ()) * screen->height ();

Subscribers

People subscribed via source and target branches