Merge lp:~brandontschaefer/unity/disable-alt-f1-dash into lp:unity

Proposed by Brandon Schaefer on 2012-03-26
Status: Merged
Approved by: Thomi Richards on 2012-03-27
Approved revision: 2171
Merged at revision: 2171
Proposed branch: lp:~brandontschaefer/unity/disable-alt-f1-dash
Merge into: lp:unity
Diff against target: 32 lines (+10/-1)
2 files modified
plugins/unityshell/src/unityshell.cpp (+1/-1)
tests/autopilot/autopilot/tests/test_dash.py (+9/-0)
To merge this branch: bzr merge lp:~brandontschaefer/unity/disable-alt-f1-dash
Reviewer Review Type Date Requested Status
Thomi Richards (community) 2012-03-26 Approve on 2012-03-27
Review via email: mp+99440@code.launchpad.net

Commit Message

Disable Alt+F1 mode when the dash is open.

Description of the Change

== Problem ==
Alt+F1 works when the dash is open, this gets you stuck in that state when you keep trying to go into Alt+F1 mode

== Fix ==
Disable Alf+F1 mode when the dash is open

== Test ==
Autopilot test

To post a comment you must log in.
Tim Penhey (thumper) wrote :

What happens if the hud is open?

Thomi Richards (thomir) wrote :

Looks good to me.

review: Approve
Brandon Schaefer (brandontschaefer) wrote :

If the hud is open it will either start Alt+F1 correctly or it just closes the hud, Ill also add update so it is disabled for the hud!

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-03-22 19:33:10 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-03-26 22:30:25 +0000
4@@ -1340,7 +1340,7 @@
5 #ifndef USE_GLES
6 cScreen->damageScreen(); // evil hack
7 #endif
8- if (_key_nav_mode_requested)
9+ if (_key_nav_mode_requested && !dash_is_open_)
10 launcher_controller_->KeyNavGrab();
11 _key_nav_mode_requested = false;
12 break;
13
14=== modified file 'tests/autopilot/autopilot/tests/test_dash.py'
15--- tests/autopilot/autopilot/tests/test_dash.py 2012-03-22 10:00:50 +0000
16+++ tests/autopilot/autopilot/tests/test_dash.py 2012-03-26 22:30:25 +0000
17@@ -301,6 +301,15 @@
18 category = lens.get_focused_category()
19 self.assertIsNot(category, None)
20
21+ def test_alt_f1_disabled(self):
22+ """This test that Alt+F1 is disabled when the dash is opened."""
23+ self.dash.ensure_visible()
24+
25+ launcher = self.launcher.get_launcher_for_monitor(0)
26+ launcher.key_nav_start()
27+
28+ self.assertThat(self.launcher.key_nav_is_active, Equals(False))
29+
30
31 class DashClipboardTests(DashTestCase):
32 """Test the Unity clipboard"""