[mutter] wayland: Make sure we have a pending geometry
- From: Olivier Fourdan <ofourdan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Make sure we have a pending geometry
- Date: Wed, 10 May 2017 08:45:25 +0000 (UTC)
commit 410d66ca37fcc36e8ece90140fc4aa0e2ae27e17
Author: Olivier Fourdan <ofourdan redhat com>
Date: Fri May 5 13:55:51 2017 +0200
wayland: Make sure we have a pending geometry
If the client doesn't set a geometry using xdg_shell, we'll compute its
geometry based on its surface and subsurfaces.
Yet, we translate that as a window (re)size only when there is a pending
geometry, that we don't have when we computed the geometry by ourself.
Make sure we set the pending new geometry flag when computing the
geometry when it actually changed.
https://bugzilla.gnome.org/show_bug.cgi?id=782213
src/wayland/meta-wayland-xdg-shell.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index 4d42514..ef9a2f5 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -1274,11 +1274,19 @@ xdg_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
}
else if (!priv->has_set_geometry)
{
+ MetaRectangle new_geometry = { 0 };
+
/* If the surface has never set any geometry, calculate
* a default one unioning the surface and all subsurfaces together. */
+
meta_wayland_surface_calculate_window_geometry (surface,
- &priv->geometry,
+ &new_geometry,
0, 0);
+ if (!meta_rectangle_equal (&new_geometry, &priv->geometry))
+ {
+ pending->has_new_geometry = TRUE;
+ priv->geometry = new_geometry;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]