Merge lp:~robertcarr/unity/dash-keepfocus into lp:unity

Proposed by Robert Carr
Status: Merged
Merged at revision: 1573
Proposed branch: lp:~robertcarr/unity/dash-keepfocus
Merge into: lp:unity
Diff against target: 23 lines (+13/-0)
1 file modified
plugins/unityshell/src/unityshell.cpp (+13/-0)
To merge this branch: bzr merge lp:~robertcarr/unity/dash-keepfocus
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+75739@code.launchpad.net

Description of the change

Don't let windows steal focus from the dash if it is open. Closes lp:830730 (https://bugs.launchpad.net/unity/+bug/830730)

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

+1

review: Approve

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 2011-09-15 12:05:46 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2011-09-16 14:19:24 +0000
4@@ -1593,6 +1593,19 @@
5 {
6 PluginAdapter::Default()->Notify(window, n);
7 window->windowNotify(n);
8+
9+ // We do this after the notify to ensure input focus has actually been moved.
10+ if (n == CompWindowNotifyFocusChange)
11+ {
12+ UnityScreen* us = UnityScreen::get(screen);
13+ CompWindow *lw;
14+
15+ if (us->dash_is_open_)
16+ {
17+ lw = screen->findWindow(us->launcherWindow->GetInputWindowId());
18+ lw->moveInputFocusTo();
19+ }
20+ }
21 }
22
23 void UnityWindow::stateChangeNotify(unsigned int lastState)