mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
Merge branch 'wip/otte/for-main' into 'main'
drop target: Warn about broken signal handler returns See merge request GNOME/gtk!5060
This commit is contained in:
commit
67049c3261
@ -430,6 +430,12 @@ gtk_drop_target_handle_event (GtkEventController *controller,
|
||||
|
||||
graphene_point_init (&self->coords, x, y);
|
||||
g_signal_emit (self, signals[MOTION], 0, x, y, &preferred);
|
||||
if (!gdk_drag_action_is_unique (preferred))
|
||||
{
|
||||
g_critical ("Handler for GtkDropTarget::motion on %s %p did not return a unique preferred action",
|
||||
G_OBJECT_TYPE_NAME (widget), widget);
|
||||
preferred = make_action_unique (preferred);
|
||||
}
|
||||
if (preferred &&
|
||||
gtk_drop_status (self->drop, self->actions, preferred))
|
||||
{
|
||||
@ -497,6 +503,12 @@ gtk_drop_target_handle_crossing (GtkEventController *controller,
|
||||
gtk_drop_target_start_drop (self, crossing->drop);
|
||||
|
||||
g_signal_emit (self, signals[ENTER], 0, x, y, &preferred);
|
||||
if (!gdk_drag_action_is_unique (preferred))
|
||||
{
|
||||
g_critical ("Handler for GtkDropTarget::enter on %s %p did not return a unique preferred action",
|
||||
G_OBJECT_TYPE_NAME (widget), widget);
|
||||
preferred = make_action_unique (preferred);
|
||||
}
|
||||
if (preferred &&
|
||||
gtk_drop_status (self->drop, self->actions, preferred))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user