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
=== modified file 'launcher/SwitcherController.cpp'
--- launcher/SwitcherController.cpp 2014-03-26 03:09:23 +0000
+++ launcher/SwitcherController.cpp 2015-02-04 08:32:35 +0000
@@ -717,6 +717,12 @@
717 return;717 return;
718 }718 }
719719
720 if (model_->switch_strictly_between_applications)
721 {
722 model_->Select(second);
723 return;
724 }
725
720 uint64_t first_highest = 0;726 uint64_t first_highest = 0;
721 uint64_t first_second = 0; // first icons second highest active727 uint64_t first_second = 0; // first icons second highest active
722 uint64_t second_first = 0; // second icons first highest active728 uint64_t second_first = 0; // second icons first highest active
723729
=== modified file 'launcher/SwitcherModel.cpp'
--- launcher/SwitcherModel.cpp 2014-01-03 18:06:23 +0000
+++ launcher/SwitcherModel.cpp 2015-02-04 08:32:35 +0000
@@ -34,6 +34,7 @@
34 : detail_selection(false)34 : detail_selection(false)
35 , detail_selection_index(0)35 , detail_selection_index(0)
36 , only_detail_on_viewport(false)36 , only_detail_on_viewport(false)
37 , switch_strictly_between_applications(false)
37 , applications_(icons)38 , applications_(icons)
38 , index_(0)39 , index_(0)
39 , last_index_(0)40 , last_index_(0)
@@ -78,6 +79,7 @@
78 .add("detail-current-count", DetailXids().size())79 .add("detail-current-count", DetailXids().size())
79 .add("detail-windows", glib::Variant::FromVector(DetailXids()))80 .add("detail-windows", glib::Variant::FromVector(DetailXids()))
80 .add("only-detail-on-viewport", only_detail_on_viewport)81 .add("only-detail-on-viewport", only_detail_on_viewport)
82 .add("switch_strictly_between_applications", switch_strictly_between_applications)
81 .add("selection-index", SelectionIndex())83 .add("selection-index", SelectionIndex())
82 .add("last-selection-index", LastSelectionIndex());84 .add("last-selection-index", LastSelectionIndex());
83}85}
8486
=== modified file 'launcher/SwitcherModel.h'
--- launcher/SwitcherModel.h 2013-09-19 16:44:03 +0000
+++ launcher/SwitcherModel.h 2015-02-04 08:32:35 +0000
@@ -60,6 +60,7 @@
60 nux::Property<bool> detail_selection;60 nux::Property<bool> detail_selection;
61 nux::Property<unsigned int> detail_selection_index;61 nux::Property<unsigned int> detail_selection_index;
62 nux::Property<bool> only_detail_on_viewport;62 nux::Property<bool> only_detail_on_viewport;
63 nux::Property<bool> switch_strictly_between_applications;
6364
64 SwitcherModel(std::vector<launcher::AbstractLauncherIcon::Ptr> const& icons);65 SwitcherModel(std::vector<launcher::AbstractLauncherIcon::Ptr> const& icons);
65 virtual ~SwitcherModel();66 virtual ~SwitcherModel();
6667
=== modified file 'plugins/unityshell/unityshell.xml.in'
--- plugins/unityshell/unityshell.xml.in 2014-04-07 03:21:46 +0000
+++ plugins/unityshell/unityshell.xml.in 2015-02-04 08:32:35 +0000
@@ -565,6 +565,12 @@
565 <passive_grab>false</passive_grab>565 <passive_grab>false</passive_grab>
566 </option>566 </option>
567567
568 <option name="switch_strictly_between_applications" type="bool">
569 <_short>Switcher strictly changes between applications</_short>
570 <_long>Disables the last focused window being the first entry in the Switcher, so Switcher strictly switches between applications</_long>
571 <default>false</default>
572 </option>
573
568 <option name="show_minimized_windows" type="bool">574 <option name="show_minimized_windows" type="bool">
569 <_short>Show live previews of windows in the Switcher</_short>575 <_short>Show live previews of windows in the Switcher</_short>
570 <_long>Enables miniature live window previews in the Switcher.</_long>576 <_long>Enables miniature live window previews in the Switcher.</_long>