diff options
-rw-r--r-- | src/core/window-private.h | 3 | ||||
-rw-r--r-- | src/core/window.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h index 02c518e0..f88f8a4d 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -86,7 +86,8 @@ typedef enum { typedef enum { META_TILE_NONE, META_TILE_LEFT, - META_TILE_RIGHT + META_TILE_RIGHT, + META_TILE_MAXIMIZE } MetaTileMode; struct _MetaWindow diff --git a/src/core/window.c b/src/core/window.c index 7a7f6bec..cd54e5b9 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -6966,7 +6966,7 @@ update_move (MetaWindow *window, * because it's about the right size */ -#define DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR 6 +#define DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR 2 shake_threshold = meta_ui_get_drag_threshold (window->screen->ui) * DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR; @@ -6995,6 +6995,8 @@ update_move (MetaWindow *window, else if (x >= work_area.x + work_area.width - shake_threshold && x < (monitor->rect.x + monitor->rect.width)) window->tile_mode = META_TILE_RIGHT; + else if ((y >= monitor->rect.y) && (y < work_area.y + shake_threshold)) + window->tile_mode = META_TILE_MAXIMIZE; else window->tile_mode = META_TILE_NONE; } @@ -7527,6 +7529,8 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window, { if (window->tile_mode != META_TILE_NONE) meta_window_tile (window); + else if (window->tile_mode == META_TILE_MAXIMIZE) + meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL); else if (event->xbutton.root == window->screen->xroot) update_move (window, event->xbutton.state & ShiftMask, event->xbutton.x_root, event->xbutton.y_root); |