From 7eb99ddef77c50c1b43219b4cb78b6dd9d66ad28 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sat, 3 Feb 2024 19:37:06 +0200 Subject: [PATCH] wayland/surface: Schedule updates in the context of the surface actor This makes all stage updates that result from applying the pending state of a Wayland surface emit an "update-scheduled" signal in the context of the relevant surface actor. A common case where an "update-scheduled" signal is needed is when applying "empty" client commits. In this case a "repaint-scheduled" signal would not be emitted since the commit doesn't trigger a repaint. However, it is still important to add handling for such updates with variable refresh rate when the releavnt actor is also driving the refresh rate. Part-of: --- src/wayland/meta-wayland-actor-surface.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index 6b3804df5..ec6c72c29 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -303,14 +303,7 @@ meta_wayland_actor_surface_apply_state (MetaWaylandSurfaceRole *surface_role, meta_wayland_actor_surface_get_instance_private (actor_surface); if (priv->actor && !wl_list_empty (&pending->frame_callback_list)) - { - ClutterStage *stage; - - stage = - CLUTTER_STAGE (clutter_actor_get_stage (CLUTTER_ACTOR (priv->actor))); - if (stage) - clutter_stage_schedule_update (stage); - } + meta_surface_actor_schedule_update (priv->actor); meta_wayland_actor_surface_queue_frame_callbacks (actor_surface, pending);