wayland/xdg-shell: Don't use xdg_surface private to get window geometry

We already used the actual API in the same function, move that call a
bit higher up to and use the variable in more places.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1295
This commit is contained in:
Jonas Ådahl 2020-06-08 10:06:44 +02:00 committed by Robert Mader
parent d6af59612c
commit 4c0aa2afca

View File

@ -789,6 +789,8 @@ meta_wayland_xdg_toplevel_post_apply_state (MetaWaylandSurfaceRole *surface_rol
MetaWaylandSurfaceRoleClass *surface_role_class;
MetaWindow *window;
MetaRectangle old_geometry;
MetaRectangle window_geometry;
gboolean geometry_changed;
window = meta_wayland_surface_get_window (surface);
@ -804,13 +806,11 @@ meta_wayland_xdg_toplevel_post_apply_state (MetaWaylandSurfaceRole *surface_rol
if (!pending->newly_attached)
return;
geometry_changed = !meta_rectangle_equal (&old_geometry, &xdg_surface_priv->geometry);
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
geometry_changed = !meta_rectangle_equal (&old_geometry, &window_geometry);
if (geometry_changed || pending->has_acked_configure_serial)
{
MetaRectangle window_geometry;
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
meta_window_wayland_finish_move_resize (window, window_geometry, pending);
}
else if (pending->dx != 0 || pending->dy != 0)