summaryrefslogtreecommitdiff
path: root/src/wayland
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2022-09-28 17:23:10 +0200
committerMarge Bot <marge-bot@gnome.org>2022-10-10 18:16:51 +0000
commit8832a5a1c2f40b503771d20095f243ac123235b7 (patch)
treebe83c18d317066989ed3171c676206cc249429ff /src/wayland
parent6cbc5180892280bb657f7cb9c6d018f8f4885f2b (diff)
downloadmutter-8832a5a1c2f40b503771d20095f243ac123235b7.tar.gz
window/wayland: Keep track of last acked configuration
This is helpful to know what current state a window actually have, in contrast to the state in MetaWindow (e.g. MetaWindow::fullscreen) which is the intended state, be it current or not yet so. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2338>
Diffstat (limited to 'src/wayland')
-rw-r--r--src/wayland/meta-window-wayland.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c
index 83181c741..dcd9d5d39 100644
--- a/src/wayland/meta-window-wayland.c
+++ b/src/wayland/meta-window-wayland.c
@@ -60,6 +60,8 @@ struct _MetaWindowWayland
int last_sent_geometry_scale;
MetaGravity last_sent_gravity;
+ MetaWaylandWindowConfiguration *last_acked_configuration;
+
gboolean has_been_shown;
};
@@ -745,6 +747,8 @@ meta_window_wayland_finalize (GObject *object)
{
MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (object);
+ g_clear_pointer (&wl_window->last_acked_configuration,
+ meta_wayland_window_configuration_free);
g_list_free_full (wl_window->pending_configurations,
(GDestroyNotify) meta_wayland_window_configuration_free);
@@ -1086,13 +1090,15 @@ meta_window_wayland_finish_move_resize (MetaWindow *window,
flags |= META_MOVE_RESIZE_WAYLAND_CLIENT_RESIZE;
}
+ g_clear_pointer (&wl_window->last_acked_configuration,
+ meta_wayland_window_configuration_free);
+ wl_window->last_acked_configuration = g_steal_pointer (&acked_configuration);
+
if (window->display->grab_window == window)
gravity = meta_resize_gravity_from_grab_op (window->display->grab_op);
else
gravity = META_GRAVITY_STATIC;
meta_window_move_resize_internal (window, flags, gravity, rect);
-
- g_clear_pointer (&acked_configuration, meta_wayland_window_configuration_free);
}
void