Merge lp://qastaging/~unity-team/unity/fixes.unityshell-overlay into lp://qastaging/unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2194
Proposed branch: lp://qastaging/~unity-team/unity/fixes.unityshell-overlay
Merge into: lp://qastaging/unity
Diff against target: 290 lines (+85/-16)
9 files modified
plugins/unityshell/src/DashController.h (+2/-1)
plugins/unityshell/src/Launcher.h (+2/-1)
plugins/unityshell/src/LauncherController.cpp (+10/-0)
plugins/unityshell/src/LauncherController.h (+2/-0)
plugins/unityshell/src/LauncherIcon.cpp (+1/-0)
plugins/unityshell/src/unityshell.cpp (+19/-13)
plugins/unityshell/src/unityshell.h (+0/-1)
tests/autopilot/autopilot/emulators/unity/hud.py (+10/-0)
tests/autopilot/autopilot/tests/test_hud.py (+39/-0)
To merge this branch: bzr merge lp://qastaging/~unity-team/unity/fixes.unityshell-overlay
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+99462@code.qastaging.launchpad.net

Commit message

Fixes unityshell.cpp not taking into account of the hud overlay being active.

Description of the change

== Problem ==
The hud being open in the unityshell wasn't taken into account. As it is an overlay there were somethings not happening for it. One big thing was input focus, now switching from the dash->hud works correctly!

The problem being is if you have the dash open then open the hud it opens the hud THEN closes the dash. This caused the dash to set key focus to NULL, which would remove key focus from the hud that had already been opened.

Also switching workspace didn't close the hud for me.

Along with make sure alt+f1 is disabled when the hud is opened.

== Fix ==
Exposed HideDash, so when the hud is about to show we can correctly close the dash BEFORE we open the hud.

Made an IsOverlayOpen function for LauncherController, which checks if any launchers have an overlay open. Using this in unityshell.cpp instead of keeping track of a boolean dash_is_open, which wasn't getting updated correctly.

== Test ==
Lots of autopilot!
-Make sure Alt+F1 is disabled
-Open Hud->Dash, make sure Alt+F1 is disabled
-Open Dash->Hud and make sure we have key focus
-Make sure the Hud closes when you switch workspaces

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

launcher_controller_->launcher() doesn't give the active launcher, but the launcher for window 0, so perhaps not best to use it that way :(

Revision history for this message
Tim Penhey (thumper) wrote :

Perhaps a better way is to add a method to LauncherController, for IsOverlayOpen, which traverses all its launchers, and returns true if any are true.

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

Thanks, good catch. Plus it looks better when used. As opposed to launcher_controller->launcher().IsOverlayOpen()...

Revision history for this message
Tim Penhey (thumper) wrote :

Much better.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Approved, thanks!

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Revision history for this message
Unity Merger (unity-merger) wrote :

Attempt to merge into lp:unity failed due to conflicts:

text conflict in plugins/unityshell/src/unityshell.cpp
text conflict in tests/autopilot/autopilot/emulators/unity/hud.py
text conflict in tests/autopilot/autopilot/tests/test_hud.py

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

Ran 42 tests in 158.498s
OK

All Hud ap test pass.

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

Opps, wrong mp...

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.