mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
window-wayland: Update the buffer rect size immediately
This commit is contained in:
parent
cc839029b9
commit
6c624e1c26
@ -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. */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user