summaryrefslogtreecommitdiff
path: root/plugins/unityshell
diff options
authorChris Townsend <christopher.townsend@canonical.com>2014-03-17 16:58:25 -0400
committerChris Townsend <christopher.townsend@canonical.com>2014-03-17 16:58:25 -0400
commitb519337dae780937eb4f40bb2dc7a4d672ff2765 (patch)
treee3f6163bb44b981081089627ce74cc31361b43bd /plugins/unityshell
parented7b183e158285175c4a96a7bb6b7bb3c5ae7c55 (diff)
Add in a CCSM option to enable the click-launcher-icon-to-minimize-window behavior.
(bzr r3725.2.2)
Diffstat (limited to 'plugins/unityshell')
-rw-r--r--plugins/unityshell/src/unityshell.cpp5
-rw-r--r--plugins/unityshell/unityshell.xml.in6
2 files changed, 11 insertions, 0 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 7dd6bb267..60afa28f5 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -380,6 +380,7 @@ UnityScreen::UnityScreen(CompScreen* screen)
optionSetLauncherCaptureMouseNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
optionSetScrollInactiveIconsNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
+ optionSetLauncherMinimizeWindowNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
ubus_manager_.RegisterInterest(UBUS_LAUNCHER_START_KEY_NAV,
sigc::mem_fun(this, &UnityScreen::OnLauncherStartKeyNav));
@@ -3401,6 +3402,9 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num)
case UnityshellOptions::ScrollInactiveIcons:
launcher_options->scroll_inactive_icons = optionGetScrollInactiveIcons();
break;
+ case UnityshellOptions::LauncherMinimizeWindow:
+ launcher_options->minimize_window_on_click = optionGetLauncherMinimizeWindow();
+ break;
case UnityshellOptions::BackgroundColor:
{
auto override_color = NuxColorFromCompizColor(optionGetBackgroundColor());
@@ -3827,6 +3831,7 @@ void UnityScreen::initLauncher()
});
launcher_controller_->options()->scroll_inactive_icons = optionGetScrollInactiveIcons();
+ launcher_controller_->options()->minimize_window_on_click = optionGetLauncherMinimizeWindow();
ScheduleRelayout(0);
}
diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in
index 86ab214b5..f00320269 100644
--- a/plugins/unityshell/unityshell.xml.in
+++ b/plugins/unityshell/unityshell.xml.in
@@ -362,6 +362,12 @@
<default>true</default>
</option>
+ <option name="launcher_minimize_window" type="bool">
+ <_short>Minimize Single Window Applications</_short>
+ <_long>Allows minimizing a single windowed application by clicking on its Launcher icon.</_long>
+ <default>false</default>
+ </option>
+
<option name="edge_responsiveness" type="float">
<_short>Launcher Reveal Edge Responsiveness</_short>
<_long>A conglomerate setting that modifies the overall responsiveness of the Launcher reveal.</_long>