From 4f2bb583bf8c7f7e37f74ba09006a17c6974d792 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Sat, 2 Mar 2013 13:15:23 +0100 Subject: [PATCH] compositor: Don't connect to the stage's paint signal Doing so causes useless full stage redraws and breaks culling as clutter cannot know how the signal handler affects painting. So use clutter_threads_add_repaint_func_full with the CLUTTER_REPAINT_FLAGS_POST_PAINT flag instead. https://bugzilla.gnome.org/show_bug.cgi?id=694988 --- src/compositor/compositor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index adf71d9a8..06ae208c6 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -453,9 +453,9 @@ meta_check_end_modal (MetaScreen *screen) } static void -after_stage_paint (ClutterActor *stage, - MetaCompScreen *info) +after_stage_paint (gpointer data) { + MetaCompScreen *info = (MetaCompScreen*) data; GList *l; for (l = info->windows; l; l = l->next) @@ -531,8 +531,10 @@ meta_compositor_manage_screen (MetaCompositor *compositor, meta_screen_set_cm_selection (screen); info->stage = clutter_stage_new (); - g_signal_connect_after (info->stage, "paint", - G_CALLBACK (after_stage_paint), info); + + clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT, + (GSourceFunc) after_stage_paint, + info, NULL); clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);