From c78b03bd50783983e9d0e75882bc8565c42ed509 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 22 Oct 2020 23:16:28 +0200 Subject: [PATCH] wayland/compositor: Only emit frame callbacks for the primary stage view Since we schedule frames for each stage view seperately now, surfaces receive frame callbacks for each stage view they are visible on. Only emit frame callbacks for the primary stage view. Part-of: --- src/wayland/meta-wayland.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index fe52a03e3..e5e9d900b 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -30,6 +30,7 @@ #include "clutter/clutter.h" #include "clutter/wayland/clutter-wayland-compositor.h" +#include "compositor/meta-surface-actor-wayland.h" #include "core/main-private.h" #include "wayland/meta-wayland-buffer.h" #include "wayland/meta-wayland-data-device.h" @@ -212,6 +213,7 @@ on_after_update (ClutterStage *stage, MetaWaylandSurface *surface = l->data; MetaSurfaceActor *actor; MetaWaylandActorSurface *actor_surface; + ClutterStageView *surface_primary_view; l = l->next; @@ -219,12 +221,9 @@ on_after_update (ClutterStage *stage, if (!actor) continue; - if (!clutter_actor_has_mapped_clones (CLUTTER_ACTOR (actor)) && - meta_surface_actor_is_obscured (actor)) - continue; - - if (!clutter_actor_is_effectively_on_stage_view (CLUTTER_ACTOR (actor), - stage_view)) + surface_primary_view = + meta_surface_actor_wayland_get_current_primary_view (actor, stage); + if (stage_view != surface_primary_view) continue; actor_surface = META_WAYLAND_ACTOR_SURFACE (surface->role);