summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-02-12 03:02:14 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-02-12 03:02:14 +0000
commit9dee8ee4e4fca545ae4b2a2d41aa748cdc8cac1a (patch)
tree39139a8cfbfcc7907bc0a6a5a7068ff53f457b59
parent31a238b6b67f5d45ecb0c82d950da47a85052108 (diff)
downloadgtk+-9dee8ee4e4fca545ae4b2a2d41aa748cdc8cac1a.tar.gz
Fixed unrealize handler to comply with the documentation (which mentions
2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx> * gtk/gtkclist.c: * gtk/gtkentry.c: * gtk/gtkfixed.c: * gtk/gtkhandlebox.c: * gtk/gtknotebook.c: * gtk/gtkpaned.c: * gtk/gtkpreview.c: * gtk/gtkrange.c: * gtk/gtkruler.c: * gtk/gtktext.c: * gtk/gtkviewport.c: Fixed unrealize handler to comply with the documentation (which mentions the right thing to do).
-rw-r--r--ChangeLog16
-rw-r--r--ChangeLog.pre-2-016
-rw-r--r--ChangeLog.pre-2-1016
-rw-r--r--ChangeLog.pre-2-216
-rw-r--r--ChangeLog.pre-2-416
-rw-r--r--ChangeLog.pre-2-616
-rw-r--r--ChangeLog.pre-2-816
-rw-r--r--gtk/gtkclist.c11
-rw-r--r--gtk/gtkentry.c12
-rw-r--r--gtk/gtkfixed.c16
-rw-r--r--gtk/gtkhandlebox.c14
-rw-r--r--gtk/gtknotebook.c16
-rw-r--r--gtk/gtkpaned.c15
-rw-r--r--gtk/gtkpreview.c16
-rw-r--r--gtk/gtkrange.c12
-rw-r--r--gtk/gtkruler.c13
-rw-r--r--gtk/gtktext.c9
-rw-r--r--gtk/gtkviewport.c10
18 files changed, 147 insertions, 109 deletions
diff --git a/ChangeLog b/ChangeLog
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index ae74e20b35..e0f39904ce 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,19 @@
+2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gtk/gtkclist.c:
+ * gtk/gtkentry.c:
+ * gtk/gtkfixed.c:
+ * gtk/gtkhandlebox.c:
+ * gtk/gtknotebook.c:
+ * gtk/gtkpaned.c:
+ * gtk/gtkpreview.c:
+ * gtk/gtkrange.c:
+ * gtk/gtkruler.c:
+ * gtk/gtktext.c:
+ * gtk/gtkviewport.c:
+ Fixed unrealize handler to comply with the
+ documentation (which mentions the right thing to do).
+
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index b950909629..e7654664e1 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -1700,7 +1700,7 @@ gtk_clist_unrealize (GtkWidget * widget)
g_return_if_fail (GTK_IS_CLIST (widget));
clist = GTK_CLIST (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
+
GTK_CLIST_SET_FLAGS (clist, CLIST_FROZEN);
gdk_cursor_destroy (clist->cursor_drag);
@@ -1708,8 +1708,6 @@ gtk_clist_unrealize (GtkWidget * widget)
gdk_gc_destroy (clist->fg_gc);
gdk_gc_destroy (clist->bg_gc);
- gtk_style_detach (widget->style);
-
for (i = 0; i < clist->columns; i++)
if (clist->column[i].window)
{
@@ -1721,17 +1719,18 @@ gtk_clist_unrealize (GtkWidget * widget)
gdk_window_set_user_data (clist->clist_window, NULL);
gdk_window_destroy (clist->clist_window);
clist->clist_window = NULL;
+
gdk_window_set_user_data (clist->title_window, NULL);
gdk_window_destroy (clist->title_window);
clist->title_window = NULL;
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
clist->cursor_drag = NULL;
clist->xor_gc = NULL;
clist->fg_gc = NULL;
clist->bg_gc = NULL;
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 850af4800d..276f779f25 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -681,11 +681,8 @@ gtk_entry_unrealize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ENTRY (widget));
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
entry = GTK_ENTRY (widget);
- gtk_style_detach (widget->style);
-
if (entry->text_area)
{
gdk_window_set_user_data (entry->text_area, NULL);
@@ -694,12 +691,9 @@ gtk_entry_unrealize (GtkWidget *widget)
gdk_cursor_destroy (entry->cursor);
entry->cursor = NULL;
}
- if (widget->window)
- {
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
- }
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 2a1b35e2f8..9b304cffc0 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -23,7 +23,6 @@ static void gtk_fixed_init (GtkFixed *fixed);
static void gtk_fixed_map (GtkWidget *widget);
static void gtk_fixed_unmap (GtkWidget *widget);
static void gtk_fixed_realize (GtkWidget *widget);
-static void gtk_fixed_unrealize (GtkWidget *widget);
static void gtk_fixed_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_fixed_size_allocate (GtkWidget *widget,
@@ -86,7 +85,6 @@ gtk_fixed_class_init (GtkFixedClass *class)
widget_class->map = gtk_fixed_map;
widget_class->unmap = gtk_fixed_unmap;
widget_class->realize = gtk_fixed_realize;
- widget_class->unrealize = gtk_fixed_unrealize;
widget_class->size_request = gtk_fixed_size_request;
widget_class->size_allocate = gtk_fixed_size_allocate;
widget_class->draw = gtk_fixed_draw;
@@ -247,20 +245,6 @@ gtk_fixed_realize (GtkWidget *widget)
}
static void
-gtk_fixed_unrealize (GtkWidget *widget)
-{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_FIXED (widget));
-
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
-
- gtk_style_detach (widget->style);
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
-}
-
-static void
gtk_fixed_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 31b817cb25..69a9823026 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -258,19 +258,8 @@ gtk_handle_box_unrealize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
-
- gtk_style_detach (widget->style);
-
hb = GTK_HANDLE_BOX (widget);
- if (widget->window)
- {
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
- }
-
if (hb->steady_window)
{
gdk_window_set_user_data (hb->steady_window, NULL);
@@ -280,6 +269,9 @@ gtk_handle_box_unrealize (GtkWidget *widget)
gtk_widget_destroy (hb->float_window);
hb->float_window = NULL;
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 171c381fe7..ee96fc7d69 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -38,7 +38,6 @@ static void gtk_notebook_init (GtkNotebook *notebook);
static void gtk_notebook_map (GtkWidget *widget);
static void gtk_notebook_unmap (GtkWidget *widget);
static void gtk_notebook_realize (GtkWidget *widget);
-static void gtk_notebook_unrealize (GtkWidget *widget);
static void gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_notebook_size_allocate (GtkWidget *widget,
@@ -131,7 +130,6 @@ gtk_notebook_class_init (GtkNotebookClass *class)
widget_class->map = gtk_notebook_map;
widget_class->unmap = gtk_notebook_unmap;
widget_class->realize = gtk_notebook_realize;
- widget_class->unrealize = gtk_notebook_unrealize;
widget_class->size_request = gtk_notebook_size_request;
widget_class->size_allocate = gtk_notebook_size_allocate;
widget_class->draw = gtk_notebook_draw;
@@ -508,20 +506,6 @@ gtk_notebook_realize (GtkWidget *widget)
}
static void
-gtk_notebook_unrealize (GtkWidget *widget)
-{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_NOTEBOOK (widget));
-
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
-
- gtk_style_detach (widget->style);
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
-}
-
-static void
gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index d47082c457..0cb4feec88 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -210,13 +210,13 @@ gtk_paned_unrealize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PANED (widget));
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
paned = GTK_PANED (widget);
- gtk_style_detach (widget->style);
-
if (paned->xor_gc)
- gdk_gc_destroy (paned->xor_gc);
+ {
+ gdk_gc_destroy (paned->xor_gc);
+ paned->xor_gc = NULL;
+ }
if (paned->handle)
{
@@ -227,11 +227,8 @@ gtk_paned_unrealize (GtkWidget *widget)
paned->cursor = NULL;
}
- if (widget->window)
- {
- gdk_window_unref (widget->window);
- widget->window = NULL;
- }
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static gint
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index 8e73d277dd..269c9fe706 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -48,7 +48,6 @@ static void gtk_preview_class_init (GtkPreviewClass *klass);
static void gtk_preview_init (GtkPreview *preview);
static void gtk_preview_finalize (GtkObject *object);
static void gtk_preview_realize (GtkWidget *widget);
-static void gtk_preview_unrealize (GtkWidget *widget);
static gint gtk_preview_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_preview_make_buffer (GtkPreview *preview);
@@ -165,7 +164,6 @@ gtk_preview_class_init (GtkPreviewClass *klass)
object_class->finalize = gtk_preview_finalize;
widget_class->realize = gtk_preview_realize;
- widget_class->unrealize = gtk_preview_unrealize;
widget_class->expose_event = gtk_preview_expose;
if (preview_info)
@@ -682,20 +680,6 @@ gtk_preview_realize (GtkWidget *widget)
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
}
-static void
-gtk_preview_unrealize (GtkWidget *widget)
-{
- GtkPreview *preview;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_PREVIEW (widget));
-
- preview = GTK_PREVIEW (widget);
-
- if (GTK_WIDGET_CLASS (parent_class)->unrealize)
- (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
-}
-
static gint
gtk_preview_expose (GtkWidget *widget,
GdkEventExpose *event)
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index ad7b53e8b6..1573a56e74 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -643,11 +643,8 @@ gtk_range_unrealize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_RANGE (widget));
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
range = GTK_RANGE (widget);
- gtk_style_detach (widget->style);
-
if (range->slider)
{
gdk_window_set_user_data (range->slider, NULL);
@@ -672,12 +669,9 @@ gtk_range_unrealize (GtkWidget *widget)
gdk_window_destroy (range->step_back);
range->step_back = NULL;
}
- if (widget->window)
- {
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
- }
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static gint
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 5876ba9fa1..009d1e6419 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -29,6 +29,8 @@ static gint gtk_ruler_expose (GtkWidget *widget,
static void gtk_ruler_make_pixmap (GtkRuler *ruler);
+static GtkWidgetClass *parent_class;
+
static GtkRulerMetric ruler_metrics[] =
{
{"Pixels", "Pi", 1.0, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
@@ -70,6 +72,8 @@ gtk_ruler_class_init (GtkRulerClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
+ parent_class = gtk_type_class (gtk_widget_get_type ());
+
widget_class->realize = gtk_ruler_realize;
widget_class->unrealize = gtk_ruler_unrealize;
widget_class->size_allocate = gtk_ruler_size_allocate;
@@ -194,12 +198,6 @@ gtk_ruler_unrealize (GtkWidget *widget)
g_return_if_fail (GTK_IS_RULER (widget));
ruler = GTK_RULER (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
-
- gtk_style_detach (widget->style);
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
if (ruler->backing_store)
gdk_pixmap_unref (ruler->backing_store);
@@ -208,6 +206,9 @@ gtk_ruler_unrealize (GtkWidget *widget)
ruler->backing_store = NULL;
ruler->non_gr_exp_gc = NULL;
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 357dbc67a7..79797cccc2 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -701,17 +701,16 @@ gtk_text_unrealize (GtkWidget *widget)
g_return_if_fail (GTK_IS_TEXT (widget));
text = GTK_TEXT (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
- gtk_style_detach (widget->style);
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
gdk_window_set_user_data (text->text_area, NULL);
gdk_window_destroy (text->text_area);
text->text_area = NULL;
+
gdk_gc_destroy (text->gc);
text->gc = NULL;
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index b899b61c8b..cf04127dde 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -345,19 +345,17 @@ gtk_viewport_unrealize (GtkWidget *widget)
g_return_if_fail (GTK_IS_VIEWPORT (widget));
viewport = GTK_VIEWPORT (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
- gtk_style_detach (widget->style);
-
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
gdk_window_set_user_data (viewport->view_window, NULL);
gdk_window_destroy (viewport->view_window);
viewport->view_window = NULL;
+
gdk_window_set_user_data (viewport->bin_window, NULL);
gdk_window_destroy (viewport->bin_window);
viewport->bin_window = NULL;
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void