mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
Fix a missing unref in the local/passive case. (#82067, Michael Meeks)
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com> * 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.
This commit is contained in:
parent
2bf6824ffa
commit
f58d55300b
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri May 17 13:56:23 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_configure_event): Only
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user