Commit cf250934 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Call gtk_selection_remove_all() here, not in destroy/ finalize. (#66636,

Thu Jan 17 17:02:38 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
	gtk_selection_remove_all() here, not in destroy/
	finalize. (#66636, Sergey Vlasov)

	* gtk/gtkselection.c (gtk_selection_request): Fix
	reentrancy problem with multiple conversions.

	* gtk/gtkselection.c (gtk_selection_remove_all):
	Don't remove incrs, we don't need the widget for
	maintain the incr.

	* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
	the widget field from here, we don't need it.
parent c8698f92
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
Thu Jan 17 17:02:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): Call
gtk_selection_remove_all() here, not in destroy/
finalize. (#66636, Sergey Vlasov)
* gtk/gtkselection.c (gtk_selection_request): Fix
reentrancy problem with multiple conversions.
* gtk/gtkselection.c (gtk_selection_remove_all):
Don't remove incrs, we don't need the widget for
maintain the incr.
* gtk/gtkselection.c (struct _GtkIncrInfo): Remove
the widget field from here, we don't need it.
Thu Jan 17 13:08:34 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
......
......@@ -102,7 +102,6 @@ struct _GtkIncrConversion
struct _GtkIncrInfo
{
GtkWidget *widget; /* Selection owner */
GdkWindow *requestor; /* Requestor window - we create a GdkWindow
so we can receive events */
GdkAtom selection; /* Selection we're sending */
......@@ -547,19 +546,6 @@ gtk_selection_remove_all (GtkWidget *widget)
/* Remove pending requests/incrs for this widget */
tmp_list = current_incrs;
while (tmp_list)
{
next = tmp_list->next;
if (((GtkIncrInfo *)tmp_list->data)->widget == widget)
{
current_incrs = g_list_remove_link (current_incrs, tmp_list);
/* structure will be freed in timeout */
g_list_free (tmp_list);
}
tmp_list = next;
}
tmp_list = current_retrievals;
while (tmp_list)
{
......@@ -1056,8 +1042,9 @@ gtk_selection_request (GtkWidget *widget,
return FALSE;
info = g_new (GtkIncrInfo, 1);
g_object_ref (widget);
info->widget = widget;
info->selection = event->selection;
info->num_incrs = 0;
......@@ -1211,12 +1198,14 @@ gtk_selection_request (GtkWidget *widget,
gdk_selection_send_notify (event->requestor, event->selection,
event->target, event->property, event->time);
}
if (info->num_incrs == 0)
{
g_free (info->conversions);
g_free (info);
}
g_object_unref (widget);
return TRUE;
}
......
......@@ -5570,7 +5570,6 @@ gtk_widget_real_destroy (GtkObject *object)
g_object_set_qdata (G_OBJECT (widget), quark_accel_closures, NULL);
gtk_grab_remove (widget);
gtk_selection_remove_all (widget);
g_object_unref (widget->style);
widget->style = gtk_widget_get_default_style ();
......@@ -5589,7 +5588,6 @@ gtk_widget_finalize (GObject *object)
GtkAccessible *accessible;
gtk_grab_remove (widget);
gtk_selection_remove_all (widget);
g_object_unref (widget->style);
widget->style = NULL;
......@@ -5729,6 +5727,8 @@ gtk_widget_real_unrealize (GtkWidget *widget)
widget->window = NULL;
}
gtk_selection_remove_all (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
}
......
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