Merge lp:~jassmith/unity/unity.alt-tab-workspaces into lp:unity

Proposed by Jason Smith
Status: Superseded
Proposed branch: lp:~jassmith/unity/unity.alt-tab-workspaces
Merge into: lp:unity
Diff against target: 14 lines (+1/-3)
1 file modified
plugins/unityshell/src/unityshell.cpp (+1/-3)
To merge this branch: bzr merge lp:~jassmith/unity/unity.alt-tab-workspaces
Reviewer Review Type Date Requested Status
Tim Penhey (community) Needs Information
Jason Smith (community) Needs Fixing
Review via email: mp+94097@code.launchpad.net

This proposal has been superseded by a proposal from 2012-02-28.

Description of the change

Code correctness fix.
Fixes potential multi-monitor issue with alt-tab getting settings confused.

= Problem description =

We passed an int into a function expecting a bool. This caused the switcher to confuse its settings and act weirdly.

= The fix =

We pass a bool now.

= Test coverage =

Existing tests cover a degree of this behavior. Currently testing does not cover multi-monitor behavior however (which is where this bug showed up). The fix is obvious and the current code is clearly and demonstrably wrong, to the point of passing the wrong type into a function.

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

Needs testing

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote :

Again a manual test describing the expected behaviour should be sufficient.

In what situation with multiple monitors was this getting broken?

review: Needs Information

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-02-18 11:47:22 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-02-22 07:46:18 +0000
4@@ -1601,9 +1601,7 @@
5
6 RaiseInputWindows();
7
8- int show_monitor = (show_mode == switcher::ShowMode::CURRENT_VIEWPORT) ? device : -1;
9-
10- auto results = launcher_controller_->GetAltTabIcons(show_monitor);
11+ auto results = launcher_controller_->GetAltTabIcons(show_mode == switcher::ShowMode::CURRENT_VIEWPORT);
12
13 if (!(results.size() == 1 && results[0]->GetIconType() == AbstractLauncherIcon::IconType::TYPE_BEGIN))
14 switcher_controller_->Show(show_mode, switcher::SortMode::FOCUS_ORDER, false, results);