wayland/actor-surface: Restore stage update for unmapped actors

The extra stage update we schedule in `apply_state()` is mainly
needed in two situations:
 - a partial update happened only in obscurred or off-screen parts
   of a surface
 - a surface requests frame callbacks without having done damage,
   notably the (in)famous Firefox vsync implementation.

Commit 0330ce1f15 limited the update to cases when the actor
was mapped, breaking it for Firefox in the overview.

Remove the mapped check again and get the stage from the backend,
restoring previous behaviour.

Fixes 0330ce1f15
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1957

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2034>
This commit is contained in:
Robert Mader 2021-10-03 19:23:39 +02:00
parent 98d5aa159e
commit e42196b00a

View File

@ -302,11 +302,10 @@ meta_wayland_actor_surface_apply_state (MetaWaylandSurfaceRole *surface_role,
if (!wl_list_empty (&pending->frame_callback_list) &&
priv->actor &&
clutter_actor_is_mapped (CLUTTER_ACTOR (priv->actor)) &&
!meta_surface_actor_is_obscured (priv->actor))
{
ClutterActor *stage =
clutter_actor_get_stage (CLUTTER_ACTOR (priv->actor));
MetaBackend *backend = meta_get_backend ();
ClutterActor *stage = meta_backend_get_stage (backend);
clutter_stage_schedule_update (CLUTTER_STAGE (stage));
}