Fix #167259, reported by Christian Persch:
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).
This commit is contained in:
parent
9eb636fe12
commit
20b67bc6ad
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
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>
|
2005-02-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
|
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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>
|
2005-02-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
|
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
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>
|
2005-02-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
|
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_changed):
|
||||||
|
@ -1898,8 +1898,13 @@ gtk_widget_unparent (GtkWidget *widget)
|
|||||||
widget->allocation.width = 1;
|
widget->allocation.width = 1;
|
||||||
widget->allocation.height = 1;
|
widget->allocation.height = 1;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_IN_REPARENT (widget))
|
if (GTK_WIDGET_REALIZED (widget))
|
||||||
gtk_widget_unrealize (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
|
/* Removing a widget from a container restores the child visible
|
||||||
* flag to the default state, so it doesn't affect the child
|
* flag to the default state, so it doesn't affect the child
|
||||||
@ -3724,7 +3729,23 @@ gtk_widget_reparent_subwindows (GtkWidget *widget,
|
|||||||
g_list_free (children);
|
g_list_free (children);
|
||||||
}
|
}
|
||||||
else
|
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
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user