summaryrefslogtreecommitdiff
path: root/plugins/unityshell
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-09-16 16:18:57 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-09-16 16:18:57 +0200
commit50a389703d127643680eb466d21741807f7c65e7 (patch)
treecaf9016aa9164b82949d02fa047857d0be701bda /plugins/unityshell
parent321325c40bf676a854ad3145442148482aeea65e (diff)
UnityScreen, CompizShortcutModeller: remove the custom keys to maximize or restore/minimize
We already have them defined in compiz core nowadays, it's better not to create even more fragmentation, but reusing what we can. Sadly I've to remove code :'( (bzr r1820.4.15)
Diffstat (limited to 'plugins/unityshell')
-rw-r--r--plugins/unityshell/src/unityshell.cpp27
-rw-r--r--plugins/unityshell/src/unityshell.h3
-rw-r--r--plugins/unityshell/unityshell.xml.in12
3 files changed, 0 insertions, 42 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 3df02d0b7..f014ca326 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -349,8 +349,6 @@ UnityScreen::UnityScreen(CompScreen* screen)
optionSetLauncherSwitcherPrevInitiate(boost::bind(&UnityScreen::launcherSwitcherPrevInitiate, this, _1, _2, _3));
optionSetLauncherSwitcherForwardTerminate(boost::bind(&UnityScreen::launcherSwitcherTerminate, this, _1, _2, _3));
- optionSetWindowMaximizeInitiate(boost::bind(&UnityScreen::maximizeKeyInitate, this, _1, _2, _3));
- optionSetWindowRestoreMinimizeInitiate(boost::bind(&UnityScreen::restoreMinimizeKeyInitiate, this, _1, _2, _3));
optionSetWindowRightMaximizeInitiate(boost::bind(&UnityScreen::rightMaximizeKeyInitiate, this, _1, _2, _3));
optionSetWindowLeftMaximizeInitiate(boost::bind(&UnityScreen::leftMaximizeKeyInitiate, this, _1, _2, _3));
@@ -2171,31 +2169,6 @@ bool UnityScreen::launcherSwitcherTerminate(CompAction* action, CompAction::Stat
return true;
}
-bool UnityScreen::maximizeKeyInitate(CompAction* action, CompAction::State state, CompOption::Vector& options)
-{
- auto& WM = WindowManager::Default();
- WM.Maximize(WM.GetActiveWindow());
- return true;
-}
-
-bool UnityScreen::restoreMinimizeKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options)
-{
- auto& WM = WindowManager::Default();
- Window focused_win = WM.GetActiveWindow();
-
- if (WM.IsWindowVerticallyMaximized(focused_win) ||
- WM.IsWindowHorizontallyMaximized(focused_win))
- {
- WM.Restore(focused_win);
- }
- else
- {
- WM.Minimize(focused_win);
- }
-
- return true;
-}
-
bool UnityScreen::rightMaximizeKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options)
{
auto& WM = WindowManager::Default();
diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h
index 09ff0361b..01e1a2089 100644
--- a/plugins/unityshell/src/unityshell.h
+++ b/plugins/unityshell/src/unityshell.h
@@ -165,9 +165,6 @@ public:
bool launcherSwitcherForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool launcherSwitcherPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool launcherSwitcherTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options);
-
- bool maximizeKeyInitate(CompAction* action, CompAction::State state, CompOption::Vector& options);
- bool restoreMinimizeKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool rightMaximizeKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool leftMaximizeKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in
index b1f9ffc23..f5ed1b656 100644
--- a/plugins/unityshell/unityshell.xml.in
+++ b/plugins/unityshell/unityshell.xml.in
@@ -68,18 +68,6 @@
<default>&lt;Alt&gt;F10</default>
</option>
- <option name="window_maximize" type="key">
- <_short>Key to maximize the focused window</_short>
- <_long>Maximize the focused window</_long>
- <default>&lt;Control&gt;&lt;Super&gt;Up</default>
- </option>
-
- <option name="window_restore_minimize" type="key">
- <_short>Key to restore or minimize the focused window</_short>
- <_long>Restore the maximized window on focus or minimize the focused window</_long>
- <default>&lt;Control&gt;&lt;Super&gt;Down</default>
- </option>
-
<option name="window_right_maximize" type="key">
<_short>Key to vertically maximize the focused window to the right</_short>
<_long>Semi-maximize vertically the focused window on the half right width of the screen</_long>