Merge lp:~3v1n0/unity/quick-alt+tab-fixes.stable into lp:unity/4.0
Status: | Work in progress |
---|---|
Proposed branch: | lp:~3v1n0/unity/quick-alt+tab-fixes.stable |
Merge into: | lp:unity/4.0 |
Diff against target: |
199 lines (+82/-36) 5 files modified
manual-tests/QuickAltTab.txt (+17/-0) plugins/unityshell/src/BamfLauncherIcon.cpp (+12/-2) plugins/unityshell/src/PluginAdapter.cpp (+44/-31) plugins/unityshell/src/SwitcherController.cpp (+8/-3) plugins/unityshell/src/WindowManager.h (+1/-0) |
To merge this branch: | bzr merge lp:~3v1n0/unity/quick-alt+tab-fixes.stable |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury (community) | Needs Fixing | ||
Review via email: mp+85585@code.launchpad.net |
Description of the change
Make the quick Alt+Tab more consistent.
The quick Alt+Tab should be handled in a different way according to bug #861250, so I've made it possible by making the SwitcherController to use the ActionArg button member to define the type of the switch that has been performed (I've made this not to add an extra member to the class, but this can be changed if you want the code to be more clean).
Then the activated BamfLauncherIcon redirects this information to the PluginAdapter's FocusWindowGroup that now when called with the FocusVisibility
A manual test is included.
163 + /* Instead of defining a new type of ActionArg we only use the "button" ->IsVisible( )) ? 0 : 1; ->detail_ selection) >Activate( ActionArg( ActionArg: :SWITCHER, 0, model_- >DetailSelectio nWindow ())); >Activate( ActionArg( ActionArg: :SWITCHER, is_quick, model_- >DetailSelectio nWindow ())); >GetQuirk (AbstractLaunch erIcon: :QUIRK_ ACTIVE) && ->DetailXids( ).empty ()) >Activate( ActionArg (ActionArg: :SWITCHER, 0, model_- >DetailXids( )[0])); >Activate( ActionArg (ActionArg: :SWITCHER, is_quick, model_- >DetailXids( )[0])); >Activate( ActionArg( ActionArg: :SWITCHER, 0)); >Activate( ActionArg( ActionArg: :SWITCHER, is_quick));
164 + * ActionArg value to indicate to the view if we're performing a quick
165 + * switch or not. */
166 + unsigned int is_quick = (view_window_ && view_window_
167 +
168 if (model_
169 {
170 - selection-
171 + selection-
172 }
173 else
174 {
175 if (selection-
176 !model_
177 {
178 - selection-
179 + selection-
180 }
181 else
182 {
183 - selection-
184 + selection-
185 }
186 }
is_quick is confusing here.
I say drop the boolean parameter and have
enum class RaiseBehaviour
{
RaiseActive,
RaiseAll
}