Merge lp:~sil2100/unity/fix_987156_5.0 into lp:unity/5.0
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Tim Penhey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2359 | ||||
Proposed branch: | lp:~sil2100/unity/fix_987156_5.0 | ||||
Merge into: | lp:unity/5.0 | ||||
Diff against target: |
90 lines (+53/-2) 3 files modified
manual-tests/Switcher.txt (+39/-0) plugins/unityshell/src/SwitcherController.cpp (+3/-2) tests/test_switcher_controller.cpp (+11/-0) |
||||
To merge this branch: | bzr merge lp:~sil2100/unity/fix_987156_5.0 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email: mp+108760@code.launchpad.net |
Commit message
Back-porting fix from unity trunk.
Don't show the switcher window during constructing the view. Wait for the ShowView timeout.
Description of the change
Description copied from the 6.0 (trunk) MRQ.
Problem description:
Both alt+tab and alt+keyabovetab, during a quick-tap, should not show the switcher but just switch to the nearest application window (as defined). The alt+keyabovetab though suffers from a problem of showing a partial creation of the switcher on most quick taps of the combination.
This is a result of the idle timer preparing the whole view before the switcher timeout. The view and switcher window is created earlier and the SwitcherView renders the model detail-mode window previews right after the idle timer constructs it.
The fix:
Since the idle timer is a way of making the switcher loading faster, we cannot remove it. But we can move the ShowWindow() call of the switcher window to the switcher timeout (from ConstructView() to ShowView()). The ShowWindow() call from Nux is a fast function that does not do much computation, so calling it during the idle timer does not have much optimization value. By making the window appear only when the view should be shown, we are not loosing anything, while we are making sure that the switcher will not appear by accident before ShowView() is called.
Test coverage:
The fix is accompanied with a GMock test (for testing if ShowView() is called) and two manual-test testing the behavior of alt+keyabovetab. So the modifications should be well tested.
Looks fine to me.