summaryrefslogtreecommitdiff
path: root/src/keybindings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keybindings.c')
-rw-r--r--src/keybindings.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/keybindings.c b/src/keybindings.c
index 6eaaefd..f46ec26 100644
--- a/src/keybindings.c
+++ b/src/keybindings.c
@@ -66,6 +66,14 @@ static void handle_toggle_maximize (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
+static void handle_maximize (MetaDisplay *display,
+ MetaWindow *window,
+ XEvent *event,
+ MetaKeyBinding *binding);
+static void handle_unmaximize (MetaDisplay *display,
+ MetaWindow *window,
+ XEvent *event,
+ MetaKeyBinding *binding);
static void handle_toggle_shade (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
@@ -233,6 +241,8 @@ static const MetaKeyHandler window_handlers[] = {
{ META_KEYBINDING_WINDOW_MENU, handle_activate_menu, NULL },
{ META_KEYBINDING_TOGGLE_FULLSCREEN, handle_toggle_fullscreen, NULL },
{ META_KEYBINDING_TOGGLE_MAXIMIZE, handle_toggle_maximize, NULL },
+ { META_KEYBINDING_MAXIMIZE, handle_maximize, NULL },
+ { META_KEYBINDING_UNMAXIMIZE, handle_unmaximize, NULL },
{ META_KEYBINDING_TOGGLE_SHADE, handle_toggle_shade, NULL },
{ META_KEYBINDING_CLOSE, handle_close_window, NULL },
{ META_KEYBINDING_MINIMIZE, handle_minimize_window, NULL },
@@ -2446,6 +2456,32 @@ handle_toggle_maximize (MetaDisplay *display,
}
static void
+handle_maximize (MetaDisplay *display,
+ MetaWindow *window,
+ XEvent *event,
+ MetaKeyBinding *binding)
+{
+ if (window)
+ {
+ if (window->has_maximize_func)
+ meta_window_maximize (window);
+ }
+}
+
+static void
+handle_unmaximize (MetaDisplay *display,
+ MetaWindow *window,
+ XEvent *event,
+ MetaKeyBinding *binding)
+{
+ if (window)
+ {
+ if (window->maximized)
+ meta_window_unmaximize (window);
+ }
+}
+
+static void
handle_toggle_shade (MetaDisplay *display,
MetaWindow *window,
XEvent *event,