wayland: Treat the size in the configure event as frame rect coordinates

This commit is contained in:
Jasper St. Pierre 2014-07-14 16:45:48 -04:00
parent 5621d3c0c7
commit 826751429b
2 changed files with 8 additions and 3 deletions

View File

@ -218,6 +218,7 @@ toplevel_surface_commit (MetaWaylandSurface *surface,
MetaRectangle geom; MetaRectangle geom;
calculate_surface_window_geometry (surface, &geom, 0, 0); calculate_surface_window_geometry (surface, &geom, 0, 0);
meta_window_client_rect_to_frame_rect (window, &geom, &geom);
meta_window_wayland_move_resize (window, geom, pending->dx, pending->dy); meta_window_wayland_move_resize (window, geom, pending->dx, pending->dy);
} }
} }

View File

@ -174,6 +174,8 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
if (flags & META_IS_WAYLAND_RESIZE) if (flags & META_IS_WAYLAND_RESIZE)
{ {
CoglTexture *texture;
/* This is a call to wl_surface_commit(), ignore the constrained_rect and /* This is a call to wl_surface_commit(), ignore the constrained_rect and
* update the real client size to match the buffer size. * update the real client size to match the buffer size.
*/ */
@ -182,8 +184,9 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
window->rect.width = unconstrained_rect.width; window->rect.width = unconstrained_rect.width;
window->rect.height = unconstrained_rect.height; window->rect.height = unconstrained_rect.height;
window->buffer_rect.width = unconstrained_rect.width; texture = window->surface->buffer->texture;
window->buffer_rect.height = unconstrained_rect.height; window->buffer_rect.width = cogl_texture_get_width (texture);
window->buffer_rect.height = cogl_texture_get_height (texture);
/* This is a commit of an attach. We should move the window to match the /* This is a commit of an attach. We should move the window to match the
* new position the client wants. */ * new position the client wants. */
@ -365,7 +368,8 @@ meta_window_wayland_move_resize (MetaWindow *window,
} }
else else
{ {
meta_window_get_frame_rect (window, &rect); rect.x = window->rect.x;
rect.y = window->rect.y;
} }
if (dx != 0 || dy != 0) if (dx != 0 || dy != 0)