From aa848134007502175927c69d667789c70f891fb4 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 21 May 2014 13:00:25 -0400 Subject: [PATCH] window-x11: Calculate size_dx / size_dy before assigning to window->rect This makes sure that we grow / shrink the frame and window in the correct order. --- src/x11/window-x11.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index fe7164919..a4c2249c8 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -1031,8 +1031,10 @@ meta_window_x11_move_resize_internal (MetaWindow *window, w = constrained_rect.width; h = constrained_rect.height; - if (w != window->rect.width || - h != window->rect.height) + size_dx = w - window->rect.width; + size_dy = h - window->rect.height; + + if (size_dx != 0 || size_dy != 0) need_resize_client = TRUE; window->rect.width = w; @@ -1174,16 +1176,9 @@ meta_window_x11_move_resize_internal (MetaWindow *window, * the client finishes redrawing. */ if (window->extended_sync_request_counter) - { - configure_frame_first = TRUE; - } + configure_frame_first = TRUE; else - { - size_dx = w - window->rect.width; - size_dy = h - window->rect.height; - - configure_frame_first = size_dx + size_dy >= 0; - } + configure_frame_first = size_dx + size_dy >= 0; if (configure_frame_first && window->frame) frame_shape_changed = meta_frame_sync_to_window (window->frame,