[mutter] wayland/xdg-shell: Don't use xdg_surface private to get window geometry
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/xdg-shell: Don't use xdg_surface private to get window geometry
- Date: Fri, 26 Jun 2020 08:03:11 +0000 (UTC)
commit 4c0aa2afcadef845a8c942bd4a67f66e37e4c75b
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Jun 8 10:06:44 2020 +0200
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 93fa3c4e96..f8ed98ec6e 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]