diff options
author | 4 <timj@birnet.org> | 2004-10-12 15:12:44 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 2004-10-12 15:12:44 +0000 |
commit | 3f32a4da462e4d2cca6551ff2400024b0b55b13f (patch) | |
tree | f17fbe38debbfbfa7806150baa8a788fe9e979fb /gtk/gtkwidget.c | |
parent | 6e2f9d6bfb6112fe784b71053c4f9dab97b7a924 (diff) | |
download | gtk+-3f32a4da462e4d2cca6551ff2400024b0b55b13f.tar.gz |
don't queue the widget for resize or emit change notification if the usize
Tue Oct 12 17:11:02 2004 <timj@birnet.org>
* gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
widget for resize or emit change notification if the usize didn't
change. this works around a buggy signal connection in #155139.
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r-- | gtk/gtkwidget.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index f9534899de..eefa3ee9c2 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -5509,25 +5509,28 @@ gtk_widget_set_usize_internal (GtkWidget *widget, gint height) { GtkWidgetAuxInfo *aux_info; + gboolean changed = FALSE; g_return_if_fail (GTK_IS_WIDGET (widget)); g_object_freeze_notify (G_OBJECT (widget)); - aux_info =_gtk_widget_get_aux_info (widget, TRUE); + aux_info = _gtk_widget_get_aux_info (widget, TRUE); - if (width > -2) + if (width > -2 && aux_info->width != width) { g_object_notify (G_OBJECT (widget), "width_request"); aux_info->width = width; + changed = TRUE; } - if (height > -2) + if (height > -2 && aux_info->height != height) { g_object_notify (G_OBJECT (widget), "height_request"); aux_info->height = height; + changed = TRUE; } - if (GTK_WIDGET_VISIBLE (widget)) + if (GTK_WIDGET_VISIBLE (widget) && changed) gtk_widget_queue_resize (widget); g_object_thaw_notify (G_OBJECT (widget)); |