[mutter] window/wayland: Keep track of last acked configuration
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window/wayland: Keep track of last acked configuration
- Date: Mon, 10 Oct 2022 19:12:55 +0000 (UTC)
commit 8832a5a1c2f40b503771d20095f243ac123235b7
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Sep 28 17:23:10 2022 +0200
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>
src/wayland/meta-window-wayland.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c
index 83181c741b..dcd9d5d393 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]