diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c b/src/backends/meta-screen-cast-monitor-stream-src.c index 5f93b3000..9d1d212d4 100644 --- a/src/backends/meta-screen-cast-monitor-stream-src.c +++ b/src/backends/meta-screen-cast-monitor-stream-src.c @@ -115,9 +115,10 @@ meta_screen_cast_monitor_stream_src_get_specs (MetaScreenCastStreamSrc *src, } static void -stage_painted (MetaStage *stage, - ClutterStageView *view, - gpointer user_data) +stage_painted (MetaStage *stage, + ClutterStageView *view, + ClutterPaintContext *paint_context, + gpointer user_data) { MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (user_data); diff --git a/src/backends/meta-stage-private.h b/src/backends/meta-stage-private.h index 428aec67f..6a264637c 100644 --- a/src/backends/meta-stage-private.h +++ b/src/backends/meta-stage-private.h @@ -38,9 +38,10 @@ typedef enum META_STAGE_WATCH_AFTER_PAINT, } MetaStageWatchPhase; -typedef void (* MetaStageWatchFunc) (MetaStage *stage, - ClutterStageView *view, - gpointer user_data); +typedef void (* MetaStageWatchFunc) (MetaStage *stage, + ClutterStageView *view, + ClutterPaintContext *paint_context, + gpointer user_data); ClutterActor *meta_stage_new (MetaBackend *backend); diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c index 01b1240ec..d5a5d8720 100644 --- a/src/backends/meta-stage.c +++ b/src/backends/meta-stage.c @@ -65,7 +65,6 @@ struct _MetaStage ClutterStage parent; GPtrArray *watchers[N_WATCH_MODES]; - ClutterStageView *current_view; GList *overlays; gboolean is_active; @@ -169,6 +168,7 @@ meta_stage_finalize (GObject *object) static void notify_watchers_for_mode (MetaStage *stage, ClutterStageView *view, + ClutterPaintContext *paint_context, MetaStageWatchPhase watch_phase) { GPtrArray *watchers; @@ -183,7 +183,7 @@ notify_watchers_for_mode (MetaStage *stage, if (watch->view && view != watch->view) continue; - watch->callback (stage, view, watch->user_data); + watch->callback (stage, view, paint_context, watch->user_data); } } @@ -192,11 +192,14 @@ meta_stage_paint (ClutterActor *actor, ClutterPaintContext *paint_context) { MetaStage *stage = META_STAGE (actor); + ClutterStageView *view; GList *l; CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor, paint_context); - notify_watchers_for_mode (stage, stage->current_view, + view = clutter_paint_context_get_stage_view (paint_context); + + notify_watchers_for_mode (stage, view, paint_context, META_STAGE_WATCH_AFTER_ACTOR_PAINT); g_signal_emit (stage, signals[ACTORS_PAINTED], 0); @@ -204,7 +207,7 @@ meta_stage_paint (ClutterActor *actor, for (l = stage->overlays; l; l = l->next) meta_overlay_paint (l->data, paint_context); - notify_watchers_for_mode (stage, stage->current_view, + notify_watchers_for_mode (stage, view, paint_context, META_STAGE_WATCH_AFTER_OVERLAY_PAINT); } @@ -215,13 +218,14 @@ meta_stage_paint_view (ClutterStage *stage, { MetaStage *meta_stage = META_STAGE (stage); - notify_watchers_for_mode (meta_stage, view, META_STAGE_WATCH_BEFORE_PAINT); + notify_watchers_for_mode (meta_stage, view, NULL, + META_STAGE_WATCH_BEFORE_PAINT); - meta_stage->current_view = view; CLUTTER_STAGE_CLASS (meta_stage_parent_class)->paint_view (stage, view, redraw_clip); - notify_watchers_for_mode (meta_stage, view, META_STAGE_WATCH_AFTER_PAINT); + notify_watchers_for_mode (meta_stage, view, NULL, + META_STAGE_WATCH_AFTER_PAINT); } static void