Merge lp:~gerboland/unity-2d/forceActiveFix into lp:unity-2d

Proposed by Gerry Boland
Status: Merged
Approved by: Florian Boucault
Approved revision: 726
Merged at revision: 744
Proposed branch: lp:~gerboland/unity-2d/forceActiveFix
Merge into: lp:unity-2d
Diff against target: 14 lines (+4/-0)
1 file modified
libunity-2d-private/src/unity2ddeclarativeview.cpp (+4/-0)
To merge this branch: bzr merge lp:~gerboland/unity-2d/forceActiveFix
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Alberto Mardegan Pending
Review via email: mp+77204@code.launchpad.net

Description of the change

[launcher] Ensure focus is given to active window. Fix bug:855569 where launcher failed to return focus to application.

I've tested with both metacity & compiz. I have experienced one time when in context menu of a launcherItem, that hitting escape returns focus to application, but launcher+menu are still open. I believe this is a separate issue.

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

Works for me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/unity2ddeclarativeview.cpp'
2--- libunity-2d-private/src/unity2ddeclarativeview.cpp 2011-09-07 11:51:57 +0000
3+++ libunity-2d-private/src/unity2ddeclarativeview.cpp 2011-09-27 17:10:30 +0000
4@@ -225,6 +225,10 @@
5
6 XSendEvent(display, QX11Info::appRootWindow(), False,
7 SubstructureRedirectMask | SubstructureNotifyMask, &xev);
8+
9+ /* Ensure focus is actually switched to active window */
10+ XSetInputFocus(display, window, RevertToParent, CurrentTime);
11+ XFlush(display);
12 }
13
14 /* Save WId of window with keyboard focus to m_last_focused_window */

Subscribers

People subscribed via source and target branches