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
This commit is contained in:
Jonas Ådahl 2018-10-22 16:04:27 +02:00
parent d70ddc65ea
commit aef865afc4
2 changed files with 4 additions and 2 deletions

View File

@ -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,

View File

@ -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,