window-wayland: Check to update the buffer_rect separately

When frame extents change, we might not update the frame rect, but the
buffer rect still needs to be updated. Split out the check for this to
be independent of the check for the frame rect.

This fixes issues that could happen when the window was maximized while
it was in the top-left corner.
This commit is contained in:
Jasper St. Pierre 2014-07-07 13:06:47 -04:00
parent e377e82cfd
commit 1de2fd7122

View File

@ -219,7 +219,14 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
*result |= META_MOVE_RESIZE_RESULT_MOVED;
window->rect.x = new_x;
window->rect.y = new_y;
}
int new_buffer_x = new_x - window->custom_frame_extents.left;
int new_buffer_y = new_y - window->custom_frame_extents.top;
if (new_buffer_x != window->buffer_rect.x || new_buffer_y != window->buffer_rect.y)
{
*result |= META_MOVE_RESIZE_RESULT_MOVED;
window->buffer_rect.x = new_x - window->custom_frame_extents.left;
window->buffer_rect.y = new_y - window->custom_frame_extents.top;
}