mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
droptarget: Fix confusion around ::leave signal
The leave signal should not take any arguments, don't pass the GdkDrop. Update the documentation, fix the emission and update users to match. This was showing up as crash when dragging files over the places sidebar.
This commit is contained in:
parent
42ca760f9c
commit
d06cdf6318
@ -471,7 +471,7 @@ gtk_drop_target_handle_crossing (GtkEventController *controller,
|
||||
crossing->new_target == widget)
|
||||
return;
|
||||
|
||||
g_signal_emit (self, signals[LEAVE], 0, self->drop);
|
||||
g_signal_emit (self, signals[LEAVE], 0);
|
||||
if (!self->dropping)
|
||||
gtk_drop_target_end_drop (self);
|
||||
gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
|
||||
@ -731,7 +731,6 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
|
||||
/**
|
||||
* GtkDropTarget::leave:
|
||||
* @self: the #GtkDropTarget
|
||||
* @drop: the #GdkDrop
|
||||
*
|
||||
* The ::leave signal is emitted on the drop site when the pointer
|
||||
* leaves the widget. Its main purpose it to undo things done in
|
||||
|
@ -1912,7 +1912,6 @@ dnd_finished_cb (GdkDrag *drag,
|
||||
*/
|
||||
static void
|
||||
drag_leave_callback (GtkDropTarget *dest,
|
||||
GdkDrop *drop,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkPlacesSidebar *sidebar = GTK_PLACES_SIDEBAR (user_data);
|
||||
|
Loading…
Reference in New Issue
Block a user