diff --git a/src/core/constraints.c b/src/core/constraints.c index 557a13f6b..6ceb336ac 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -805,8 +805,14 @@ constrain_maximization (MetaWindow *window, return TRUE; /* Calculate target_size = maximized size of (window + frame) */ - if (window->maximized_horizontally && window->maximized_vertically) - target_size = info->work_area_monitor; + if (META_WINDOW_TILED_MAXIMIZED (window)) + { + meta_window_get_current_tile_area (window, &target_size); + } + else if (META_WINDOW_MAXIMIZED (window)) + { + target_size = info->work_area_monitor; + } else { /* Amount of maximization possible in a single direction depends diff --git a/src/core/window-private.h b/src/core/window-private.h index 1d1ae91f7..8a5fd6258 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -425,6 +425,8 @@ struct _MetaWindowClass (w)->tile_mode == META_TILE_LEFT) #define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \ (w)->tile_mode == META_TILE_RIGHT) +#define META_WINDOW_TILED_MAXIMIZED(w)(META_WINDOW_MAXIMIZED(w) && \ + (w)->tile_mode == META_TILE_MAXIMIZED) #define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen) #define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded) #define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \