Merge lp:~townsend/compiz/fix-auto-vp-switch-0.9.10 into lp:compiz/0.9.10

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3791
Merged at revision: 3791
Proposed branch: lp:~townsend/compiz/fix-auto-vp-switch-0.9.10
Merge into: lp:compiz/0.9.10
Diff against target: 55 lines (+21/-18)
1 file modified
plugins/wall/src/wall.cpp (+21/-18)
To merge this branch: bzr merge lp:~townsend/compiz/fix-auto-vp-switch-0.9.10
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+186881@code.launchpad.net

Commit message

Fix regression when selecting apps on a different viewport than the current one will no longer automatically switch the viewport.

Description of the change

= Issue =
A regression has occurred in which auto switching viewports no longer happens when using global Alt-Tab or selecting an app on the Launcher that is in a different viewport.

= Fix =
Be more smart about when to check for the optionGetAutoSwitchVpAndWindow () bool. Now only check in the code block that actually moves the window to a different viewport. This is only a half fix now for bug #1092323. The part of that bug to not switch viewports when the window is > 50% in a different viewport is still not fixed.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Confirmed fixes the issue, though we'll have to re-visit the other bug this was fixing :). This is a bigger thing to get fixed first.

LGTM

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/wall/src/wall.cpp'
--- plugins/wall/src/wall.cpp 2013-08-28 12:06:03 +0000
+++ plugins/wall/src/wall.cpp 2013-09-20 20:47:17 +0000
@@ -553,7 +553,7 @@
553{553{
554 WALL_SCREEN (screen);554 WALL_SCREEN (screen);
555555
556 if (ws->optionGetAutoSwitchVpAndWindow () && window->placed () && !screen->otherGrabExist ("wall", "switcher", 0))556 if (window->placed () && !screen->otherGrabExist ("wall", "switcher", 0))
557 {557 {
558 int dx, dy;558 int dx, dy;
559 CompPoint viewport;559 CompPoint viewport;
@@ -582,23 +582,26 @@
582 return;582 return;
583 }583 }
584584
585 ws->focusDefault = false;585 if (ws->optionGetAutoSwitchVpAndWindow ())
586586 {
587 CompRegion screenRegion;587 ws->focusDefault = false;
588588
589 foreach (const CompOutput &o, screen->outputDevs ())589 CompRegion screenRegion;
590 screenRegion += o.workArea ();590
591591 foreach (const CompOutput &o, screen->outputDevs ())
592 CompPoint d = compiz::wall::movementWindowOnScreen (window->serverBorderRect (),592 screenRegion += o.workArea ();
593 screenRegion);593
594594 CompPoint d = compiz::wall::movementWindowOnScreen (window->serverBorderRect (),
595 mask |= d.x () !=0 ? CWX : 0;595 screenRegion);
596 mask |= d.y () !=0 ? CWY : 0;596
597597 mask |= d.x () !=0 ? CWX : 0;
598 xwc.x = window->serverGeometry ().x () + d.x ();598 mask |= d.y () !=0 ? CWY : 0;
599 xwc.y = window->serverGeometry ().y () + d.y ();599
600600 xwc.x = window->serverGeometry ().x () + d.x ();
601 window->configureXWindow (mask, &xwc);601 xwc.y = window->serverGeometry ().y () + d.y ();
602
603 window->configureXWindow (mask, &xwc);
604 }
602 }605 }
603 }606 }
604607

Subscribers

People subscribed via source and target branches