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

Proposed by Sami Jaktholm on 2013-07-19
Status: Merged
Approved by: Brandon Schaefer on 2013-07-19
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 on 2013-07-19
Brandon Schaefer (community) Approve on 2013-07-19
Sam Spilsbury 2013-07-19 Approve on 2013-07-19
Review via email:

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.
Sam Spilsbury (smspillaz) wrote :

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

review: Approve
Brandon Schaefer (brandontschaefer) wrote :

Looks good to me.

review: Approve
review: Approve (continuous-integration)
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;
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);
14 int x = (viewport.x () - screen->vp ().x ()) * screen->width ();
15 int y = (viewport.y () - screen->vp ().y ()) * screen->height ();


People subscribed via source and target branches