mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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
(cherry picked from commit 4c0aa2afca
)
This commit is contained in:
parent
9b349cb25b
commit
36a6235f3a
@ -790,6 +790,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);
|
||||
@ -805,13 +807,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)
|
||||
|
Loading…
Reference in New Issue
Block a user