[gtk+/wip/window-unfocused-fixes: 1/13] widget: Always propagate state flags to all children
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/window-unfocused-fixes: 1/13] widget: Always propagate state flags to all children
- Date: Tue, 13 Dec 2011 21:03:15 +0000 (UTC)
commit 98610fc24962593046cead25f605a73011abb5f9
Author: Rui Matos <tiagomatos gmail com>
Date: Sun Dec 11 19:20:02 2011 +0000
widget: Always propagate state flags to all children
https://bugzilla.gnome.org/show_bug.cgi?id=666126
gtk/gtkwidget.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8d772df..0a3949f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -532,7 +532,6 @@ struct _GtkStateData
{
guint flags : GTK_STATE_FLAGS_BITS;
guint operation : 2;
- guint use_forall : 1;
};
/* --- prototypes --- */
@@ -7087,7 +7086,6 @@ _gtk_widget_update_state_flags (GtkWidget *widget,
data.flags = flags;
data.operation = operation;
- data.use_forall = FALSE;
gtk_widget_propagate_state (widget, &data);
@@ -7682,8 +7680,6 @@ gtk_widget_set_sensitive (GtkWidget *widget,
data.operation = STATE_CHANGE_SET;
}
- data.use_forall = TRUE;
-
gtk_widget_propagate_state (widget, &data);
gtk_widget_queue_resize (widget);
@@ -7798,7 +7794,6 @@ gtk_widget_set_parent (GtkWidget *widget,
data.flags |= priv->state_flags;
data.operation = STATE_CHANGE_REPLACE;
- data.use_forall = gtk_widget_is_sensitive (parent) != gtk_widget_is_sensitive (widget);
gtk_widget_propagate_state (widget, &data);
gtk_widget_reset_style (widget);
@@ -10742,14 +10737,9 @@ gtk_widget_propagate_state (GtkWidget *widget,
/* Make sure to only propate the right states further */
child_data.flags &= GTK_STATE_FLAGS_DO_PROPAGATE;
- if (child_data.use_forall)
- gtk_container_forall (GTK_CONTAINER (widget),
- (GtkCallback) gtk_widget_propagate_state,
- &child_data);
- else
- gtk_container_foreach (GTK_CONTAINER (widget),
- (GtkCallback) gtk_widget_propagate_state,
- &child_data);
+ gtk_container_forall (GTK_CONTAINER (widget),
+ (GtkCallback) gtk_widget_propagate_state,
+ &child_data);
}
/* Trigger state change transitions for the widget */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]