diff options
author | David Warman <dwarman@manglebit.org> | 2014-02-25 18:14:00 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2014-03-20 17:26:37 +0000 |
commit | 5d53620bb94e428f891d1d0c143c2afd47b1466b (patch) | |
tree | eb4f31c7921faa9a8a8009e80a789985f5c74c4e | |
parent | 2b3fac8b3ddc51b2bef5f294495472ce00924efa (diff) | |
download | clutter-5d53620bb94e428f891d1d0c143c2afd47b1466b.tar.gz |
stage: re-implement minimal paint() method to respect Z order
Without a paint() implementation in clutter-stage, the function
from clutter-group is used. That class has its own child list,
but attempts to use sort_depth_order, which is empty in this case.
This provides a partial fix by replacing a minimal paint(), see:
https://bugzilla.gnome.org/show_bug.cgi?id=711645
-rw-r--r-- | clutter/clutter-stage.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 24f675954..356fa1ec0 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -691,6 +691,21 @@ _clutter_stage_do_paint (ClutterStage *stage, clutter_stage_invoke_paint_callback (stage); } +/* If we don't implement this here, we get the paint function + * from the deprecated clutter-group class, which doesn't + * respect the Z order as it uses our empty sort_depth_order. + */ +static void +clutter_stage_paint (ClutterActor *self) +{ + ClutterActorIter iter; + ClutterActor *child; + + clutter_actor_iter_init (&iter, self); + while (clutter_actor_iter_next (&iter, &child)) + clutter_actor_paint (child); +} + #if 0 /* the Stage is cleared in clutter_actor_paint_node() */ static void @@ -1873,6 +1888,7 @@ clutter_stage_class_init (ClutterStageClass *klass) actor_class->allocate = clutter_stage_allocate; actor_class->get_preferred_width = clutter_stage_get_preferred_width; actor_class->get_preferred_height = clutter_stage_get_preferred_height; + actor_class->paint = clutter_stage_paint; actor_class->pick = clutter_stage_pick; actor_class->get_paint_volume = clutter_stage_get_paint_volume; actor_class->realize = clutter_stage_realize; |