Merge lp:~jassmith/unity/unity.fix-alt-tab-mm-confusion into lp:unity

Proposed by Jason Smith
Status: Superseded
Proposed branch: lp:~jassmith/unity/unity.fix-alt-tab-mm-confusion
Merge into: lp:unity
Prerequisite: lp:~jassmith/unity/unity.fix-alt-tab-progression
Diff against target: 36 lines (+3/-5)
2 files modified
plugins/unityshell/src/SwitcherController.cpp (+2/-2)
plugins/unityshell/src/unityshell.cpp (+1/-3)
To merge this branch: bzr merge lp:~jassmith/unity/unity.fix-alt-tab-mm-confusion
Reviewer Review Type Date Requested Status
Jason Smith (community) Needs Fixing
Review via email: mp+94108@code.launchpad.net

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

Description of the change

= The Problem =
Alt-tab would get stuck in detail mode when two windows on different monitors were open

= The Fix =
Don't leak the DetailXids() abstraction from the SwitcherModel. The assumed internal implementation changed, breaking SwitcherController

= Testing =
None yet

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

Doesn't contain tests

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

Lets start with a manual test with detailed description of how to set up the environment.

From there we'll work to make a simple AP test.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/SwitcherController.cpp'
2--- plugins/unityshell/src/SwitcherController.cpp 2012-02-22 09:24:24 +0000
3+++ plugins/unityshell/src/SwitcherController.cpp 2012-02-22 09:24:24 +0000
4@@ -265,7 +265,7 @@
5 switch (detail_mode_)
6 {
7 case TAB_NEXT_WINDOW:
8- if (model_->detail_selection_index < model_->Selection()->Windows().size () - 1)
9+ if (model_->detail_selection_index < model_->DetailXids().size () - 1)
10 model_->NextDetail();
11 else
12 model_->Next();
13@@ -320,7 +320,7 @@
14
15 void Controller::SetDetail(bool value, unsigned int min_windows)
16 {
17- if (value && model_->Selection()->Windows().size () >= min_windows)
18+ if (value && model_->DetailXids().size () >= min_windows)
19 {
20 model_->detail_selection = true;
21 detail_mode_ = TAB_NEXT_WINDOW;
22
23=== modified file 'plugins/unityshell/src/unityshell.cpp'
24--- plugins/unityshell/src/unityshell.cpp 2012-02-18 11:47:22 +0000
25+++ plugins/unityshell/src/unityshell.cpp 2012-02-22 09:24:24 +0000
26@@ -1601,9 +1601,7 @@
27
28 RaiseInputWindows();
29
30- int show_monitor = (show_mode == switcher::ShowMode::CURRENT_VIEWPORT) ? device : -1;
31-
32- auto results = launcher_controller_->GetAltTabIcons(show_monitor);
33+ auto results = launcher_controller_->GetAltTabIcons(show_mode == switcher::ShowMode::CURRENT_VIEWPORT);
34
35 if (!(results.size() == 1 && results[0]->GetIconType() == AbstractLauncherIcon::IconType::TYPE_BEGIN))
36 switcher_controller_->Show(show_mode, switcher::SortMode::FOCUS_ORDER, false, results);