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
=== modified file 'src/window.cpp'
--- src/window.cpp 2013-07-19 04:15:01 +0000
+++ src/window.cpp 2013-07-19 06:39:23 +0000
@@ -3553,7 +3553,10 @@
3553 int mask = 0;3553 int mask = 0;
3554 CompPoint viewport;3554 CompPoint viewport;
35553555
3556 screen->viewportForGeometry (old, viewport);3556 if (old.intersects (CompRect (0, 0, screen->width (), screen->height ())))
3557 viewport = screen->vp ();
3558 else
3559 screen->viewportForGeometry (old, viewport);
35573560
3558 int x = (viewport.x () - screen->vp ().x ()) * screen->width ();3561 int x = (viewport.x () - screen->vp ().x ()) * screen->width ();
3559 int y = (viewport.y () - screen->vp ().y ()) * screen->height ();3562 int y = (viewport.y () - screen->vp ().y ()) * screen->height ();

Subscribers

People subscribed via source and target branches