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

Proposed by Brandon Schaefer on 2012-03-27
Status: Rejected
Rejected by: Brandon Schaefer on 2012-03-27
Proposed branch: lp:~brandontschaefer/unity/disable-alt-f1-hud
Merge into: lp:unity
Diff against target: 28 lines (+9/-1)
2 files modified
plugins/unityshell/src/unityshell.cpp (+1/-1)
tests/autopilot/autopilot/tests/test_hud.py (+8/-0)
To merge this branch: bzr merge lp:~brandontschaefer/unity/disable-alt-f1-hud
Reviewer Review Type Date Requested Status
Thomi Richards (community) 2012-03-27 Approve on 2012-03-27
Review via email: mp+99457@code.launchpad.net

Commit Message

Disable Alt+F1 mode in the hud

Description of the Change

== Problem ==
Alt+F1 works when the hud is open

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

== Test ==
Autopilot test

To post a comment you must log in.
Thomi Richards (thomir) wrote :

Looks good.

review: Approve
Brandon Schaefer (brandontschaefer) wrote :

https://code.launchpad.net/~unity-team/unity/fixes.unityshell-overlay/+merge/99462

End up having to do a lot more work of here. So reject this branch!

Unmerged revisions

2172. By Brandon Schaefer on 2012-03-27

* Disable Alt+F1 mode in 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-26 21:52:33 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-03-27 01:35:22 +0000
4@@ -1340,7 +1340,7 @@
5 #ifndef USE_GLES
6 cScreen->damageScreen(); // evil hack
7 #endif
8- if (_key_nav_mode_requested && !dash_is_open_)
9+ if (_key_nav_mode_requested && !dash_is_open_ && !hud_controller_->IsVisible())
10 launcher_controller_->KeyNavGrab();
11 _key_nav_mode_requested = false;
12 break;
13
14=== modified file 'tests/autopilot/autopilot/tests/test_hud.py'
15--- tests/autopilot/autopilot/tests/test_hud.py 2012-03-21 14:44:41 +0000
16+++ tests/autopilot/autopilot/tests/test_hud.py 2012-03-27 01:35:22 +0000
17@@ -211,3 +211,11 @@
18 contents = open("/tmp/autopilot_gedit_undo_test_temp_file.txt").read().strip('\n')
19 self.assertEqual("0 ", contents)
20
21+ def test_disabled_alt_f1(self):
22+ """This test shows that Alt+F1 mode is disabled for the hud."""
23+ self.hud.toggle_reveal()
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))