diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-06 16:53:51 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-06 17:04:09 -0500 |
commit | bf3397b588e0209486945e4bd71d28c5dc2e1497 (patch) | |
tree | c2197d1684f3f7b26480fe18f2c31151132065ff /clutter-gtk | |
parent | 092ee700235bbd626cfb62d7dacd15a5319782c7 (diff) | |
download | clutter-gtk-bf3397b588e0209486945e4bd71d28c5dc2e1497.tar.gz |
embed: queue a draw on actors when embed state flag change
When we receive a state-flags-changed signal, we should queue a draw on
all of our children, since their appearance might be depending on
inherited style values that changed.
This should really be done generically by GTK, but doing it there is
very bad for performance with the current GTK code, so we do it here.
Diffstat (limited to 'clutter-gtk')
-rw-r--r-- | clutter-gtk/gtk-clutter-embed.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clutter-gtk/gtk-clutter-embed.c b/clutter-gtk/gtk-clutter-embed.c index 0863f28..ea4658e 100644 --- a/clutter-gtk/gtk-clutter-embed.c +++ b/clutter-gtk/gtk-clutter-embed.c @@ -669,6 +669,17 @@ gtk_clutter_embed_event (GtkWidget *widget, } static void +gtk_clutter_embed_state_flags_changed (GtkWidget *widget, + GtkStateFlags prev_state_flags) +{ + GTK_WIDGET_CLASS (gtk_clutter_embed_parent_class)->state_flags_changed + (widget, prev_state_flags); + + gtk_container_forall (GTK_CONTAINER (widget), + (GtkCallback) gtk_widget_queue_draw, NULL); +} + +static void gtk_clutter_embed_class_init (GtkClutterEmbedClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); @@ -693,6 +704,7 @@ gtk_clutter_embed_class_init (GtkClutterEmbedClass *klass) widget_class->key_press_event = gtk_clutter_embed_key_event; widget_class->key_release_event = gtk_clutter_embed_key_event; widget_class->event = gtk_clutter_embed_event; + widget_class->state_flags_changed = gtk_clutter_embed_state_flags_changed; container_class->add = gtk_clutter_embed_add; container_class->remove = gtk_clutter_embed_remove; |