compositor: Make sure we always call the post_paint handlers

Commit 4f2bb583bf started to use a clutter_threads_add_repaint_func_full
callback instead of connecting to the stage's paint signal.

The callback has to return TRUE if it wants to be called again, so fix that
as we want to call it for every frame (otherwise apps supporting the WM SYNC
protocol will stop drawing).

https://bugzilla.gnome.org/show_bug.cgi?id=695006
This commit is contained in:
Adel Gadllah 2013-03-02 18:08:46 +01:00
parent e4269002ce
commit 436d3ff8a9

View File

@ -452,7 +452,7 @@ meta_check_end_modal (MetaScreen *screen)
} }
} }
static void static gboolean
after_stage_paint (gpointer data) after_stage_paint (gpointer data)
{ {
MetaCompScreen *info = (MetaCompScreen*) data; MetaCompScreen *info = (MetaCompScreen*) data;
@ -460,6 +460,8 @@ after_stage_paint (gpointer data)
for (l = info->windows; l; l = l->next) for (l = info->windows; l; l = l->next)
meta_window_actor_post_paint (l->data); meta_window_actor_post_paint (l->data);
return TRUE;
} }
void void
@ -533,7 +535,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
info->stage = clutter_stage_new (); info->stage = clutter_stage_new ();
clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT, clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT,
(GSourceFunc) after_stage_paint, after_stage_paint,
info, NULL); info, NULL);
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY); clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);