From b519337dae780937eb4f40bb2dc7a4d672ff2765 Mon Sep 17 00:00:00 2001 From: Chris Townsend Date: Mon, 17 Mar 2014 16:58:25 -0400 Subject: Add in a CCSM option to enable the click-launcher-icon-to-minimize-window behavior. (bzr r3725.2.2) --- plugins/unityshell/src/unityshell.cpp | 5 +++++ plugins/unityshell/unityshell_xml.in | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'plugins/unityshell') 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 @@ true + +