Merge lp://qastaging/~brandontschaefer/unity/hud-to-dash-loses-win-focus into lp://qastaging/unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2308
Proposed branch: lp://qastaging/~brandontschaefer/unity/hud-to-dash-loses-win-focus
Merge into: lp://qastaging/unity
Diff against target: 59 lines (+29/-5)
2 files modified
plugins/unityshell/src/DashController.cpp (+0/-2)
tests/autopilot/autopilot/tests/test_dash.py (+29/-3)
To merge this branch: bzr merge lp://qastaging/~brandontschaefer/unity/hud-to-dash-loses-win-focus
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Thomi Richards (community) Approve
Review via email: mp+102598@code.qastaging.launchpad.net

Commit message

Fixed going from the Hud to the Dash forgetting window focus when exiting from the Dash.

Description of the change

=== Problem ===
Going from the Hud to the Dash and then quiting causes the window focus to be lost.

=== Fix ===
This line of code adapter->saveInputFoucs() was causing the problem, removed it. It makes AdapterPlugin::restoreInputFocus() use m_Screen->focusDefaultWindow() instead of using the _last_focused_window.

=== Test ===
AP test included, and all Dash AP test pass.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

+1

review: Approve
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve
Revision history for this message
Andrea Azzarone (azzar1) wrote :

How can this work if you remove the call to saveInputFocus?

review: Needs Information
Revision history for this message
Andrea Azzarone (azzar1) wrote :

> How can this work if you remove the call to saveInputFocus?
How can this work if you're removing the call to saveInputFocus?

review: Needs Information
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Btw it works so +1

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

> > How can this work if you remove the call to saveInputFocus?
> How can this work if you're removing the call to saveInputFocus?

It makes it use m_Screen->focusDefaultWindow() which gets the top window on the screen. I can't find a case where this wont work correctly...It is also how the Hud does it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.