Merge lp:~aacid/unity-2d/unity-2d-shell-f1_toggle_launcher into lp:~unity-2d-team/unity-2d/unity-2d-shell

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 910
Merged at revision: 912
Proposed branch: lp:~aacid/unity-2d/unity-2d-shell-f1_toggle_launcher
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell
Diff against target: 18 lines (+6/-2)
1 file modified
shell/app/shelldeclarativeview.cpp (+6/-2)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d-shell-f1_toggle_launcher
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Review via email: mp+88856@code.launchpad.net

Description of the change

[launcher] Implement toggling with F1 (feature lost when moving to shell)

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

The unity-2d repo has a unit test for this, maybe it's a good idea to merge the test to unity-2d-shell first

Revision history for this message
Michał Sawicz (saviq) wrote :

The test for this ported from trunk is in lp:~saviq/unity-2d/shell-uitests

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/app/shelldeclarativeview.cpp'
2--- shell/app/shelldeclarativeview.cpp 2012-01-10 16:52:24 +0000
3+++ shell/app/shelldeclarativeview.cpp 2012-01-17 14:03:23 +0000
4@@ -319,8 +319,12 @@
5 void
6 ShellDeclarativeView::onAltF1Pressed()
7 {
8- Q_EMIT launcherFocusRequested();
9- forceActivateWindow();
10+ if (!isActiveWindow()) {
11+ Q_EMIT launcherFocusRequested();
12+ forceActivateWindow();
13+ } else {
14+ forceDeactivateWindow();
15+ }
16 }
17
18 /* ----------------- super key handling ---------------- */

Subscribers

People subscribed via source and target branches