Merge lp://qastaging/~brandontschaefer/unity/launcher-autohide-fix into lp://qastaging/unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Thomi Richards
Approved revision: no longer in the source branch.
Merged at revision: 2578
Proposed branch: lp://qastaging/~brandontschaefer/unity/launcher-autohide-fix
Merge into: lp://qastaging/unity
Diff against target: 368 lines (+93/-93)
8 files modified
launcher/BamfLauncherIcon.cpp (+0/-4)
launcher/Launcher.cpp (+24/-35)
launcher/Launcher.h (+2/-0)
launcher/LauncherHideMachine.cpp (+19/-32)
launcher/LauncherHideMachine.h (+15/-16)
tests/autopilot/unity/emulators/launcher.py (+5/-3)
tests/autopilot/unity/tests/launcher/test_reveal.py (+28/-0)
unity-shared/UBusMessages.h (+0/-3)
To merge this branch: bzr merge lp://qastaging/~brandontschaefer/unity/launcher-autohide-fix
Reviewer Review Type Date Requested Status
Thomi Richards (community) quality Approve
Review via email: mp+118815@code.qastaging.launchpad.net

Commit message

The launcher will only autohide when the mouse leaves the launcher now.

Description of the change

=== Problem ===
When any action would take place on the Launcher it would send a UBus message back to the launcher to close the launcher while the mouse was still over the launcher.

=== Fix ===
Remove that call! So now when an action happens and the mouse is still over the launcher it will not close. Only until the mouse is outside of the launcher will it close.

=== Test ===
AP tests

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

174 - LAST_ACTION_ACTIVATE = 1 << 15, 32k
175 SCALE_ACTIVE = 1 << 16, 64k #VISIBLE_REQUIRED
176 EXPO_ACTIVE = 1 << 17, 128k #VISIBLE_REQUIRED
177 MT_DRAG_OUT = 1 << 18, 256k #VISIBLE_REQUIRED

Update the values from SCALE_ACTIVE to MT_DRAG_OUT, if you remove a middle element...

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

C'mon Brandon. AP test plz ;-)

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

I have 2 in! I just forgot to update the description....

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

Hi,

306 + def click_launcher_icon(self, icon, button=1, move_mouse_after=True):
307 """Move the mouse over the launcher icon, and click it.
308 `icon` must be an instance of SimpleLauncherIcon or it's descendants.
309 """

Please update the docstring to document the extra parameter.

316 + self._mouse.click(button, press_duration=0.10)

Why are you altering the click duration? The default should work everywhere. If the default is too slow then we need to update the default duration in the mouse emulator.

331 + """When clicking on the launcher to close spread the launcher must not autohide."""

Please remove the word "When", so it becomes:

"""Clicking on the launcher to close an active spread must not hide the launcher."""

Starting the docstring with an active verb makes the test intent easier to follow.

336 + self.assertVisibleWindowStack([char_win2, char_win1])
337 + self.assertProperty(char_win2, is_focused=True)

Why do you care about this? I can't see how it's relevant to the intent of the test...

349 + """When clicking on an icon the launcher must not autohide."""

same comment here - the docstring should instead be:

"""Clicking on a launcher icon must not hide the launcher."""

357 + sleep(1)

I think you should make this a bit longer - maybe 5 seconds?

Please let me know if any of this doesn't make sense.

review: Needs Fixing (quality)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve (quality)

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.