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.
This commit is contained in:
Jasper St. Pierre 2014-05-21 13:00:25 -04:00
parent dd243813e1
commit aa84813400

View File

@ -1031,8 +1031,10 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
w = constrained_rect.width; w = constrained_rect.width;
h = constrained_rect.height; h = constrained_rect.height;
if (w != window->rect.width || size_dx = w - window->rect.width;
h != window->rect.height) size_dy = h - window->rect.height;
if (size_dx != 0 || size_dy != 0)
need_resize_client = TRUE; need_resize_client = TRUE;
window->rect.width = w; window->rect.width = w;
@ -1174,16 +1176,9 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
* the client finishes redrawing. * the client finishes redrawing.
*/ */
if (window->extended_sync_request_counter) if (window->extended_sync_request_counter)
{ configure_frame_first = TRUE;
configure_frame_first = TRUE;
}
else else
{ configure_frame_first = size_dx + size_dy >= 0;
size_dx = w - window->rect.width;
size_dy = h - window->rect.height;
configure_frame_first = size_dx + size_dy >= 0;
}
if (configure_frame_first && window->frame) if (configure_frame_first && window->frame)
frame_shape_changed = meta_frame_sync_to_window (window->frame, frame_shape_changed = meta_frame_sync_to_window (window->frame,