1
0
Fork 0

window-actor/wayland: Keep track of when the geometry needs to be synced

The window actor can be mapped every frame, e.g. when it is dragged in
the overview. This commit keeps track when the geometry changed and we
didn't managed to sync the geometry yet and need to sync it at a later
time.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3404>
This commit is contained in:
Sebastian Wick 2023-11-16 23:02:57 +01:00 committed by Marge Bot
parent 9e036bfd23
commit 63c6fe11fb

View file

@ -50,6 +50,7 @@ struct _MetaWindowActorWayland
ClutterActor *background;
MetaSurfaceContainerActorWayland *surface_container;
gulong highest_scale_monitor_handler_id;
gboolean needs_sync;
};
static void cullable_iface_init (MetaCullableInterface *iface);
@ -582,7 +583,7 @@ meta_window_actor_wayland_sync_geometry (MetaWindowActor *actor)
{
MetaWindowActorWayland *self = META_WINDOW_ACTOR_WAYLAND (actor);
do_sync_geometry (self);
self->needs_sync = !do_sync_geometry (self);
}
static void
@ -594,7 +595,11 @@ meta_window_actor_wayland_map (ClutterActor *actor)
parent_class->map (actor);
do_sync_geometry (self);
if (self->needs_sync)
{
do_sync_geometry (self);
self->needs_sync = FALSE;
}
}
static void