Merge lp:~jassmith/unity/unity.fix-alt-tab-to-minimized into lp:unity

Proposed by Jason Smith
Status: Merged
Merged at revision: 2035
Proposed branch: lp:~jassmith/unity/unity.fix-alt-tab-to-minimized
Merge into: lp:unity
Diff against target: 32 lines (+7/-1)
1 file modified
plugins/unityshell/src/PluginAdapter.cpp (+7/-1)
To merge this branch: bzr merge lp:~jassmith/unity/unity.fix-alt-tab-to-minimized
Reviewer Review Type Date Requested Status
Tim Penhey (community) Needs Fixing
Jason Smith (community) Needs Fixing
Review via email: mp+94110@code.launchpad.net

Description of the change

= The Problem =

See: https://bugs.launchpad.net/unity/+bug/933397

= The Fix =

Check if there are any mapped windows on the current workspace only when deciding what to focus

= Testing =

None yet

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

No tests

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

Please add a manual test for this. We can then work to make an AP test from it. Often it is hard to work out what AP methods we want until we have a more definitive test defined.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/PluginAdapter.cpp'
2--- plugins/unityshell/src/PluginAdapter.cpp 2012-02-07 10:59:23 +0000
3+++ plugins/unityshell/src/PluginAdapter.cpp 2012-02-22 10:01:20 +0000
4@@ -579,6 +579,7 @@
5 CompWindow* top_window_on_monitor = NULL;
6 bool any_on_current = false;
7 bool any_mapped = false;
8+ bool any_mapped_on_current = false;
9 bool forced_unminimize = false;
10
11 /* sort the list */
12@@ -596,6 +597,11 @@
13 if (win->defaultViewport() == m_Screen->vp())
14 {
15 any_on_current = true;
16+
17+ if (!win->minimized())
18+ {
19+ any_mapped_on_current = true;
20+ }
21 }
22
23 if (!win->minimized())
24@@ -644,7 +650,7 @@
25 if (!is_mapped)
26 win->raise ();
27 }
28- else if ((any_mapped && !win->minimized()) || !any_mapped)
29+ else if ((any_mapped_on_current && !win->minimized()) || !any_mapped_on_current)
30 {
31 if (!forced_unminimize || target_vp == m_Screen->vp())
32 {