diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2018-10-22 16:04:27 +0200 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2019-12-09 10:09:40 +0100 |
commit | aef865afc4cc1be8e5378c802792ab1ec9cea4f6 (patch) | |
tree | ce9a023dce0abdfbbf3b6969d04c08c8cdb471dd | |
parent | d70ddc65ea923d14dfa8f5b1f486455e6b6234b6 (diff) | |
download | mutter-aef865afc4cc1be8e5378c802792ab1ec9cea4f6.tar.gz |
wayland/xdg-shell: Scope variable better
A window geometry rectangle was declared in the wrong scope. Both
xdg-shell and legacy xdg-shell had the same issue.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
-rw-r--r-- | src/wayland/meta-wayland-legacy-xdg-shell.c | 3 | ||||
-rw-r--r-- | src/wayland/meta-wayland-xdg-shell.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c index 0311a264a..d9f68b3d1 100644 --- a/src/wayland/meta-wayland-legacy-xdg-shell.c +++ b/src/wayland/meta-wayland-legacy-xdg-shell.c @@ -662,7 +662,6 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role, MetaWaylandSurface *surface = meta_wayland_surface_role_get_surface (surface_role); MetaWindow *window; - MetaRectangle window_geometry; MetaRectangle old_geometry; gboolean geometry_changed; @@ -696,6 +695,8 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role, if (geometry_changed || meta_window_wayland_needs_move_resize (window)) { + MetaRectangle window_geometry; + window_geometry = meta_wayland_zxdg_surface_v6_get_window_geometry (xdg_surface); meta_window_wayland_move_resize (window, diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c index da983127c..672659f50 100644 --- a/src/wayland/meta-wayland-xdg-shell.c +++ b/src/wayland/meta-wayland-xdg-shell.c @@ -685,7 +685,6 @@ meta_wayland_xdg_toplevel_commit (MetaWaylandSurfaceRole *surface_role, MetaWaylandSurface *surface = meta_wayland_surface_role_get_surface (surface_role); MetaWindow *window; - MetaRectangle window_geometry; MetaRectangle old_geometry; gboolean geometry_changed; @@ -726,6 +725,8 @@ meta_wayland_xdg_toplevel_commit (MetaWaylandSurfaceRole *surface_role, if (geometry_changed || meta_window_wayland_needs_move_resize (window)) { + MetaRectangle window_geometry; + window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface); meta_window_wayland_move_resize (window, &xdg_surface_priv->acked_configure_serial, |