From 3b9575baf8d254b7ba8b5faf56b14fbc6c3fde74 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 7 Dec 2009 18:41:15 +0000 Subject: [PATCH] Queue a relayout when the default text direction changes We need a relayout cycle if the default direction for the text changes while the main loop is running. --- clutter/clutter-main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 90452482d..81756347f 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -3093,13 +3093,19 @@ clutter_check_version (guint major, void clutter_set_default_text_direction (ClutterTextDirection text_dir) { + ClutterStageManager *manager; + const GSList *stages, *l; + if (text_dir == CLUTTER_TEXT_DIRECTION_DEFAULT) text_dir = clutter_get_text_direction (); if (text_dir != clutter_text_direction) clutter_text_direction = text_dir; - /* FIXME - queue a relayout on all stages */ + manager = clutter_stage_manager_get_default (); + stages = clutter_stage_manager_peek_stages (manager); + for (l = stages; l != NULL; l = l->next) + clutter_actor_queue_relayout (l->data); } ClutterTextDirection