[mutter] wayland: Treat the size in the configure event as frame rect coordinates
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Treat the size in the configure event as frame rect coordinates
- Date: Thu, 17 Jul 2014 21:01:04 +0000 (UTC)
commit 826751429b40deddfce3479fa3861d0d5a042b6e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jul 14 16:45:48 2014 -0400
wayland: Treat the size in the configure event as frame rect coordinates
src/wayland/meta-wayland-surface.c | 1 +
src/wayland/window-wayland.c | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 9fdb647..f01a428 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -218,6 +218,7 @@ toplevel_surface_commit (MetaWaylandSurface *surface,
MetaRectangle geom;
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);
}
}
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index 7c80c24..5abbc54 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -174,6 +174,8 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
if (flags & META_IS_WAYLAND_RESIZE)
{
+ CoglTexture *texture;
+
/* This is a call to wl_surface_commit(), ignore the constrained_rect and
* 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.height = unconstrained_rect.height;
- window->buffer_rect.width = unconstrained_rect.width;
- window->buffer_rect.height = unconstrained_rect.height;
+ texture = window->surface->buffer->texture;
+ 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
* new position the client wants. */
@@ -365,7 +368,8 @@ meta_window_wayland_move_resize (MetaWindow *window,
}
else
{
- meta_window_get_frame_rect (window, &rect);
+ rect.x = window->rect.x;
+ rect.y = window->rect.y;
}
if (dx != 0 || dy != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]