[mutter] window-wayland: Update the buffer rect size immediately
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-wayland: Update the buffer rect size immediately
- Date: Mon, 28 Jul 2014 10:05:52 +0000 (UTC)
commit 6c624e1c26252c30e80919b0dae50e78bfe9d263
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jul 28 11:30:15 2014 +0200
window-wayland: Update the buffer rect size immediately
src/wayland/meta-wayland-surface.c | 5 +++++
src/wayland/window-wayland.c | 11 -----------
2 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 99301bc..d2d6000 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -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. */
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index f52b4c1..060e5b8 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]