From 559e6ff327a358a6daa4b0683fee95700591749f Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Mon, 7 Nov 2022 16:48:57 -0500 Subject: [PATCH 1/2] tiling: Skip the resize effect for tiled windows during user grabs. meta_window_tile gets called by the grabbed window's match during tile resizing. These incremental changes don't need to be animated. Closes: #2246 Part-of: --- src/core/window.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index 962c05f204d..c2e24e570bd 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2912,7 +2912,6 @@ meta_window_tile (MetaWindow *window, MetaTileMode tile_mode) { MetaMaximizeFlags directions; - MetaRectangle old_frame_rect, old_buffer_rect; g_return_if_fail (META_IS_WINDOW (window)); @@ -2941,12 +2940,17 @@ meta_window_tile (MetaWindow *window, /* Setup the edge constraints */ update_edge_constraints (window); - meta_window_get_frame_rect (window, &old_frame_rect); - meta_window_get_buffer_rect (window, &old_buffer_rect); + if (!window->tile_match || window->tile_match != window->display->grab_window) + { + MetaRectangle old_frame_rect, old_buffer_rect; + + meta_window_get_frame_rect (window, &old_frame_rect); + meta_window_get_buffer_rect (window, &old_buffer_rect); - meta_compositor_size_change_window (window->display->compositor, window, - META_SIZE_CHANGE_MAXIMIZE, - &old_frame_rect, &old_buffer_rect); + meta_compositor_size_change_window (window->display->compositor, window, + META_SIZE_CHANGE_MAXIMIZE, + &old_frame_rect, &old_buffer_rect); + } meta_window_move_resize_internal (window, (META_MOVE_RESIZE_MOVE_ACTION | -- GitLab From ec17d19c76fdb53e5b0a96d3783403c7517abc26 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Mon, 7 Nov 2022 16:49:35 -0500 Subject: [PATCH 2/2] tiling: Remove unnecessary update_edge_constraints(). Both meta_window_maximize and meta_window_tile use meta_window_maximize_internal(), and edge constraints are already recalculated and updated there. Part-of: --- src/core/window.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index c2e24e570bd..0a4f8eb5ac0 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2937,9 +2937,6 @@ meta_window_tile (MetaWindow *window, meta_window_maximize_internal (window, directions, NULL); meta_display_update_tile_preview (window->display, FALSE); - /* Setup the edge constraints */ - update_edge_constraints (window); - if (!window->tile_match || window->tile_match != window->display->grab_window) { MetaRectangle old_frame_rect, old_buffer_rect; -- GitLab