Merge lp:~gerboland/unity/add-option-to-fix-alt-tab into lp:unity

Proposed by Gerry Boland
Status: Superseded
Proposed branch: lp:~gerboland/unity/add-option-to-fix-alt-tab
Merge into: lp:unity
Diff against target: 65 lines (+15/-0)
4 files modified
launcher/SwitcherController.cpp (+6/-0)
launcher/SwitcherModel.cpp (+2/-0)
launcher/SwitcherModel.h (+1/-0)
plugins/unityshell/unityshell.xml.in (+6/-0)
To merge this branch: bzr merge lp:~gerboland/unity/add-option-to-fix-alt-tab
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+248497@code.launchpad.net

This proposal has been superseded by a proposal from 2015-04-03.

Commit message

Add option to have Switcher strictly between applications, and not select the previously focused window as first selection (even if that window part of the same application)

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

Ok, looks good.
Thanks ;)

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

Hmm, it not working right. /me shouldn't code in bed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/SwitcherController.cpp'
2--- launcher/SwitcherController.cpp 2014-03-26 03:09:23 +0000
3+++ launcher/SwitcherController.cpp 2015-02-04 08:32:35 +0000
4@@ -717,6 +717,12 @@
5 return;
6 }
7
8+ if (model_->switch_strictly_between_applications)
9+ {
10+ model_->Select(second);
11+ return;
12+ }
13+
14 uint64_t first_highest = 0;
15 uint64_t first_second = 0; // first icons second highest active
16 uint64_t second_first = 0; // second icons first highest active
17
18=== modified file 'launcher/SwitcherModel.cpp'
19--- launcher/SwitcherModel.cpp 2014-01-03 18:06:23 +0000
20+++ launcher/SwitcherModel.cpp 2015-02-04 08:32:35 +0000
21@@ -34,6 +34,7 @@
22 : detail_selection(false)
23 , detail_selection_index(0)
24 , only_detail_on_viewport(false)
25+ , switch_strictly_between_applications(false)
26 , applications_(icons)
27 , index_(0)
28 , last_index_(0)
29@@ -78,6 +79,7 @@
30 .add("detail-current-count", DetailXids().size())
31 .add("detail-windows", glib::Variant::FromVector(DetailXids()))
32 .add("only-detail-on-viewport", only_detail_on_viewport)
33+ .add("switch_strictly_between_applications", switch_strictly_between_applications)
34 .add("selection-index", SelectionIndex())
35 .add("last-selection-index", LastSelectionIndex());
36 }
37
38=== modified file 'launcher/SwitcherModel.h'
39--- launcher/SwitcherModel.h 2013-09-19 16:44:03 +0000
40+++ launcher/SwitcherModel.h 2015-02-04 08:32:35 +0000
41@@ -60,6 +60,7 @@
42 nux::Property<bool> detail_selection;
43 nux::Property<unsigned int> detail_selection_index;
44 nux::Property<bool> only_detail_on_viewport;
45+ nux::Property<bool> switch_strictly_between_applications;
46
47 SwitcherModel(std::vector<launcher::AbstractLauncherIcon::Ptr> const& icons);
48 virtual ~SwitcherModel();
49
50=== modified file 'plugins/unityshell/unityshell.xml.in'
51--- plugins/unityshell/unityshell.xml.in 2014-04-07 03:21:46 +0000
52+++ plugins/unityshell/unityshell.xml.in 2015-02-04 08:32:35 +0000
53@@ -565,6 +565,12 @@
54 <passive_grab>false</passive_grab>
55 </option>
56
57+ <option name="switch_strictly_between_applications" type="bool">
58+ <_short>Switcher strictly changes between applications</_short>
59+ <_long>Disables the last focused window being the first entry in the Switcher, so Switcher strictly switches between applications</_long>
60+ <default>false</default>
61+ </option>
62+
63 <option name="show_minimized_windows" type="bool">
64 <_short>Show live previews of windows in the Switcher</_short>
65 <_long>Enables miniature live window previews in the Switcher.</_long>