diff options
author | Omar Zeidan <[email protected]> | 2017-12-11 14:54:17 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-12-20 20:42:12 +0100 |
commit | 6219f8e8bcaeefb9185a3c3f5f20de4e2fa8f18f (patch) | |
tree | e3652b4e35ca31478ef9f62f89765ff6d97e7b3a /src/core/keybindings.c | |
parent | 01f68e8f9f1541393e6e069db08f834d4ef18691 (diff) | |
download | marco-6219f8e8bcaeefb9185a3c3f5f20de4e2fa8f18f.tar.bz2 marco-6219f8e8bcaeefb9185a3c3f5f20de4e2fa8f18f.tar.xz |
Allow horizontal and vertical resizing when corner tiled
Diffstat (limited to 'src/core/keybindings.c')
-rw-r--r-- | src/core/keybindings.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 3a54ca0d..0c9a5e27 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -1457,9 +1457,8 @@ process_mouse_move_resize_grab (MetaDisplay *display, meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL); - else if (window->tile_mode == META_TILE_LEFT || - window->tile_mode == META_TILE_RIGHT|| - META_WINDOW_QUARTER_TILED(window)) + else if (window->tile_mode != META_TILE_MAXIMIZED && + window->tile_mode != META_TILE_NONE) meta_window_tile (window); else if (!display->grab_wireframe_active) meta_window_move_resize (display->grab_window, @@ -3090,24 +3089,11 @@ handle_toggle_tiled (MetaDisplay *display, { MetaTileMode mode = binding->handler->data; - if (mode == window->tile_mode && - window->maximized_vertically && - !window->maximized_horizontally) + if (mode == window->tile_mode && META_WINDOW_TILED(window)) { - if (window->saved_maximize) - { - window->tile_mode = META_TILE_MAXIMIZED; - window->tile_monitor_number = meta_screen_get_xinerama_for_window (window->screen, window)->number; - meta_window_maximize (window, META_MAXIMIZE_VERTICAL | - META_MAXIMIZE_HORIZONTAL); - } - else - { - window->tile_mode = META_TILE_NONE; - window->tile_monitor_number = -1; - meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL | - META_MAXIMIZE_HORIZONTAL); - } + window->tile_mode = META_TILE_NONE; + window->tile_monitor_number = -1; + meta_window_untile(window); } else if (meta_window_can_tile (window)) { @@ -3128,6 +3114,7 @@ handle_toggle_tiled (MetaDisplay *display, window->saved_maximize = FALSE; window->maximized_horizontally = FALSE; + window->maximized_vertically = FALSE; meta_window_tile (window); } } |