From 4c0aa2afcadef845a8c942bd4a67f66e37e4c75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 8 Jun 2020 10:06:44 +0200 Subject: [PATCH] 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 --- src/wayland/meta-wayland-xdg-shell.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c index 93fa3c4e9..f8ed98ec6 100644 --- a/src/wayland/meta-wayland-xdg-shell.c +++ b/src/wayland/meta-wayland-xdg-shell.c @@ -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)