window-wayland: Update the buffer rect size immediately

This commit is contained in:
Jasper St. Pierre 2014-07-28 11:30:15 +02:00
parent cc839029b9
commit 6c624e1c26
2 changed files with 5 additions and 11 deletions

View File

@ -214,6 +214,11 @@ toplevel_surface_commit (MetaWaylandSurface *surface,
{
MetaRectangle geom = { 0 };
CoglTexture *texture = surface->buffer->texture;
/* Update the buffer rect immediately. */
window->buffer_rect.width = cogl_texture_get_width (texture);
window->buffer_rect.height = cogl_texture_get_height (texture);
if (pending->has_new_geometry)
{
/* If we have new geometry, use it. */

View File

@ -188,17 +188,6 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
window->rect.height = unconstrained_rect.height;
}
CoglTexture *texture = window->surface->buffer->texture;
int new_buffer_width = cogl_texture_get_width (texture);
int new_buffer_height = cogl_texture_get_height (texture);
if (window->buffer_rect.width != new_buffer_width ||
window->buffer_rect.height != new_buffer_height)
{
*result |= META_MOVE_RESIZE_RESULT_RESIZED;
window->buffer_rect.width = new_buffer_width;
window->buffer_rect.height = new_buffer_height;
}
/* This is a commit of an attach. We should move the window to match the
* new position the client wants. */
can_move_now = TRUE;