+2005-02-24 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #167259, reported by Christian Persch:
+
+ * gtk/gtkwidget.c (gtk_widget_unparent): Unmap the reparented
+ widget, even if we avoid the unrealizing.
+ (gtk_widget_reparent_subwindows): Make reparenting work for
+ !NO_WINDOW widgets which have other windows which are siblings
+ of widget->window (as e.g. GtkSpinButton).
+
2005-02-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
+2005-02-24 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #167259, reported by Christian Persch:
+
+ * gtk/gtkwidget.c (gtk_widget_unparent): Unmap the reparented
+ widget, even if we avoid the unrealizing.
+ (gtk_widget_reparent_subwindows): Make reparenting work for
+ !NO_WINDOW widgets which have other windows which are siblings
+ of widget->window (as e.g. GtkSpinButton).
+
2005-02-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
+2005-02-24 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #167259, reported by Christian Persch:
+
+ * gtk/gtkwidget.c (gtk_widget_unparent): Unmap the reparented
+ widget, even if we avoid the unrealizing.
+ (gtk_widget_reparent_subwindows): Make reparenting work for
+ !NO_WINDOW widgets which have other windows which are siblings
+ of widget->window (as e.g. GtkSpinButton).
+
2005-02-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
widget->allocation.width = 1;
widget->allocation.height = 1;
- if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_IN_REPARENT (widget))
- gtk_widget_unrealize (widget);
+ if (GTK_WIDGET_REALIZED (widget))
+ {
+ if (GTK_WIDGET_IN_REPARENT (widget))
+ gtk_widget_unmap (widget);
+ else
+ gtk_widget_unrealize (widget);
+ }
/* Removing a widget from a container restores the child visible
* flag to the default state, so it doesn't affect the child
g_list_free (children);
}
else
- gdk_window_reparent (widget->window, new_window, 0, 0);
+ {
+ GdkWindow *parent = gdk_window_get_parent (widget->window);
+
+ GList *children = gdk_window_get_children (parent);
+ GList *tmp_list;
+ for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
+ {
+ GtkWidget *child;
+ GdkWindow *window = tmp_list->data;
+
+ gdk_window_get_user_data (window, (void **)&child);
+ if (child == widget)
+ gdk_window_reparent (window, new_window, 0, 0);
+ }
+
+ g_list_free (children);
+ }
}
static void