diff --git a/ChangeLog b/ChangeLog index 0a41265ca3..d8997cab95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Fri May 17 13:56:23 2002 Owen Taylor + + * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing + unref in the local/passive case. (#82067, Michael + Meeks) + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix + reference leak on the plug window. + + * tests/testsocket.c (add_child): Fix memory leak. + + * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref + the proxy window. + Thu May 16 19:49:24 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_configure_event): Only diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0a41265ca3..d8997cab95 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Fri May 17 13:56:23 2002 Owen Taylor + + * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing + unref in the local/passive case. (#82067, Michael + Meeks) + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix + reference leak on the plug window. + + * tests/testsocket.c (add_child): Fix memory leak. + + * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref + the proxy window. + Thu May 16 19:49:24 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_configure_event): Only diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0a41265ca3..d8997cab95 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +Fri May 17 13:56:23 2002 Owen Taylor + + * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing + unref in the local/passive case. (#82067, Michael + Meeks) + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix + reference leak on the plug window. + + * tests/testsocket.c (add_child): Fix memory leak. + + * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref + the proxy window. + Thu May 16 19:49:24 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_configure_event): Only diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0a41265ca3..d8997cab95 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Fri May 17 13:56:23 2002 Owen Taylor + + * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing + unref in the local/passive case. (#82067, Michael + Meeks) + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix + reference leak on the plug window. + + * tests/testsocket.c (add_child): Fix memory leak. + + * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref + the proxy window. + Thu May 16 19:49:24 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_configure_event): Only diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0a41265ca3..d8997cab95 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Fri May 17 13:56:23 2002 Owen Taylor + + * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing + unref in the local/passive case. (#82067, Michael + Meeks) + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix + reference leak on the plug window. + + * tests/testsocket.c (add_child): Fix memory leak. + + * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref + the proxy window. + Thu May 16 19:49:24 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_configure_event): Only diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0a41265ca3..d8997cab95 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Fri May 17 13:56:23 2002 Owen Taylor + + * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing + unref in the local/passive case. (#82067, Michael + Meeks) + + * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix + reference leak on the plug window. + + * tests/testsocket.c (add_child): Fix memory leak. + + * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref + the proxy window. + Thu May 16 19:49:24 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_configure_event): Only diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 0682db2b2c..aef0ca6061 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1511,6 +1511,9 @@ gtk_drag_dest_site_destroy (gpointer data) { GtkDragDestSite *site = data; + if (site->proxy_window) + g_object_unref (site->proxy_window); + if (site->target_list) gtk_target_list_unref (site->target_list); diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index fc3b66a828..5d076a4acb 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -48,8 +48,6 @@ static void gtk_plug_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static gboolean gtk_plug_key_press_event (GtkWidget *widget, GdkEventKey *event); -static gboolean gtk_plug_focus_event (GtkWidget *widget, - GdkEventFocus *event); static void gtk_plug_set_focus (GtkWindow *window, GtkWidget *focus); static gboolean gtk_plug_focus (GtkWidget *widget, @@ -125,8 +123,6 @@ gtk_plug_class_init (GtkPlugClass *class) widget_class->realize = gtk_plug_realize; widget_class->unrealize = gtk_plug_unrealize; widget_class->key_press_event = gtk_plug_key_press_event; - widget_class->focus_in_event = gtk_plug_focus_event; - widget_class->focus_out_event = gtk_plug_focus_event; widget_class->show = gtk_plug_show; widget_class->hide = gtk_plug_hide; @@ -284,7 +280,9 @@ _gtk_plug_remove_from_socket (GtkPlug *plug, GTK_PRIVATE_UNSET_FLAG (plug, GTK_IN_REPARENT); socket->plug_widget = NULL; + g_object_unref (socket->plug_window); socket->plug_window = NULL; + socket->same_app = FALSE; plug->same_app = FALSE; @@ -657,17 +655,6 @@ gtk_plug_key_press_event (GtkWidget *widget, return FALSE; } -static gboolean -gtk_plug_focus_event (GtkWidget *widget, - GdkEventFocus *event) -{ - /* We eat focus-in events and focus-out events, since they - * can be generated by something like a keyboard grab on - * a child of the plug. - */ - return FALSE; -} - static void gtk_plug_set_focus (GtkWindow *window, GtkWidget *focus) @@ -1013,24 +1000,15 @@ handle_xembed_message (GtkPlug *plug, case XEMBED_FOCUS_OUT: { - GtkWidget *widget = GTK_WIDGET (plug); GdkEvent event; event.focus_change.type = GDK_FOCUS_CHANGE; - event.focus_change.window = widget->window; + event.focus_change.window = GTK_WIDGET (plug)->window; event.focus_change.send_event = TRUE; + event.focus_change.in = (message == XEMBED_FOCUS_IN); + + gtk_widget_event (GTK_WIDGET (plug), &event); - if (message == XEMBED_FOCUS_IN) - { - event.focus_change.in = TRUE; - GTK_WIDGET_CLASS (parent_class)->focus_in_event (widget, (GdkEventFocus *)&event); - } - else - { - event.focus_change.in = FALSE; - GTK_WIDGET_CLASS (parent_class)->focus_out_event (widget, (GdkEventFocus *)&event); - } - break; } @@ -1137,7 +1115,7 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) } } else - break; + goto done; } if (xre->parent != GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen))) @@ -1172,7 +1150,8 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) if (!was_embedded) g_signal_emit (G_OBJECT (plug), plug_signals[EMBEDDED], 0); } - + + done: g_object_unref (plug); break; diff --git a/tests/testsocket.c b/tests/testsocket.c index c3ad14e246..1b695defd4 100644 --- a/tests/testsocket.c +++ b/tests/testsocket.c @@ -225,6 +225,7 @@ add_child (GtkWidget *window, } g_io_add_watch (channel, G_IO_IN | G_IO_HUP, child_read_watch, NULL); + g_io_channel_unref (channel); } void