guard widget access with ref/unref around signal emission.
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c: (gtk_widget_unrealize): guard widget access with ref/unref around signal emission. (gtk_widget_hide): same here, but also check its destroyed state before queueing a resize.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c:
|
||||
(gtk_widget_unrealize): guard widget access with ref/unref
|
||||
around signal emission.
|
||||
(gtk_widget_hide): same here, but also check its destroyed
|
||||
state before queueing a resize.
|
||||
|
||||
Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead
|
||||
|
||||
@@ -1509,9 +1509,11 @@ gtk_widget_hide (GtkWidget *widget)
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (widget))
|
||||
{
|
||||
gtk_widget_ref (widget);
|
||||
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[HIDE]);
|
||||
if (!GTK_WIDGET_TOPLEVEL (widget))
|
||||
if (!GTK_WIDGET_TOPLEVEL (widget) && !GTK_OBJECT_DESTROYED (widget))
|
||||
gtk_widget_queue_resize (widget);
|
||||
gtk_widget_unref (widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1694,8 +1696,10 @@ gtk_widget_unrealize (GtkWidget *widget)
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
gtk_widget_ref (widget);
|
||||
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[UNREALIZE]);
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
|
||||
gtk_widget_unref (widget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user