Merge lp://qastaging/~brandontschaefer/unity/disable-switcher-when-wall-active 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: 2551
Proposed branch: lp://qastaging/~brandontschaefer/unity/disable-switcher-when-wall-active
Merge into: lp://qastaging/unity
Diff against target: 792 lines (+225/-176)
9 files modified
launcher/SwitcherController.cpp (+7/-0)
launcher/SwitcherController.h (+2/-0)
plugins/unityshell/src/unityshell.cpp (+4/-2)
tests/autopilot/unity/tests/test_switcher.py (+16/-0)
unity-shared/PluginAdapter.h (+23/-21)
unity-shared/PluginAdapterCompiz.cpp (+25/-19)
unity-shared/PluginAdapterStandalone.cpp (+70/-64)
unity-shared/WindowManager.cpp (+59/-53)
unity-shared/WindowManager.h (+19/-17)
To merge this branch: bzr merge lp://qastaging/~brandontschaefer/unity/disable-switcher-when-wall-active
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Thomi Richards (community) quality Approve
Review via email: mp+117997@code.qastaging.launchpad.net

Commit message

Switcher is now disabled when the Wall plugin is Active.

Description of the change

=== Problem ===
When the wall plugin is active (while switching workspaces) Alt+Tab would pick up the wrong workspace.

=== Fix ===
When the wall plugin is active the switcher must be disabled. It is now.

=== Test ===
AP test

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

Hi,

10 + return (!(results.size() == 1 &&
11 + results[0]->GetIconType() == AbstractLauncherIcon::IconType::TYPE_DESKTOP) &&
12 + !WindowManager::Default()->IsWallActive() &&
13 + !results.empty());

Can we please change this to be a bit more sane? First of all, you're checking both "results.size() == 1" and then later checking "!results.empty()". If the first is true, the second will always be true. I'm also not a fn of multi-line code that requires you to write "(!(".

71 + self.workspace.switch_to(0)
72 + sleep(1)
73 + self.keyboard.press("Ctrl+Alt+Right")
74 + sleep(1)
75 + self.keybinding_hold_part_then_tap("switcher/reveal_normal")
76 + self.addCleanup(self.switcher.terminate)
77 + self.keyboard.release("Ctrl+Alt")

This will leave keys in a pressed state. Please add cleanup actions to release the Ctrl+Alt+Right keys.

Other than that, looks good!

review: Needs Fixing (quality)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve (quality)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Fine for me.

review: Approve
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/unity/tests/test_switcher.py

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.