Commit 757ae6f1 authored by Kjell Ahlstedt's avatar Kjell Ahlstedt Committed by Matthias Clasen

GtkWindow: Override gtk_container_remove ()

Check which child is being removed, title_box or the GtkBin child.

https://bugzilla.gnome.org/show_bug.cgi?id=709049
parent 9490e706
......@@ -389,6 +389,8 @@ static gint gtk_window_focus_out_event (GtkWidget *widget,
static void gtk_window_style_updated (GtkWidget *widget);
static gboolean gtk_window_state_event (GtkWidget *widget,
GdkEventWindowState *event);
static void gtk_window_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_window_check_resize (GtkContainer *container);
static void gtk_window_forall (GtkContainer *container,
gboolean include_internals,
......@@ -666,6 +668,7 @@ gtk_window_class_init (GtkWindowClass *klass)
widget_class->get_preferred_height = gtk_window_get_preferred_height;
widget_class->get_preferred_height_for_width = gtk_window_get_preferred_height_for_width;
container_class->remove = gtk_window_remove;
container_class->check_resize = gtk_window_check_resize;
container_class->forall = gtk_window_forall;
......@@ -7581,6 +7584,17 @@ gtk_window_focus_out_event (GtkWidget *widget,
return FALSE;
}
static void
gtk_window_remove (GtkContainer *container,
GtkWidget *widget)
{
GtkWindow *window = GTK_WINDOW (container);
if (widget == window->priv->title_box)
unset_titlebar (window);
else
GTK_CONTAINER_CLASS (gtk_window_parent_class)->remove (container, widget);
}
static void
gtk_window_check_resize (GtkContainer *container)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment