From aa95b4f341ded6784b96fb2a456502b08485a591 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 18 Mar 2024 21:15:39 -0400 Subject: [PATCH] dnd: Use the default cursor during motion When no action is selected, use the default cursor, and only switch to one of the action-indicating cursors when we are over a drop target. Fixes: #6337 Fixes: #6511 --- gdk/gdkdrag.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gdk/gdkdrag.c b/gdk/gdkdrag.c index a0d821a369..43bbc98a45 100644 --- a/gdk/gdkdrag.c +++ b/gdk/gdkdrag.c @@ -50,18 +50,6 @@ #include "gdkenumtypes.h" #include "gdkeventsprivate.h" -static struct { - GdkDragAction action; - const char *name; - GdkCursor *cursor; -} drag_cursors[] = { - { GDK_ACTION_ASK, "dnd-ask", NULL }, - { GDK_ACTION_COPY, "copy", NULL }, - { GDK_ACTION_MOVE, "move", NULL }, - { GDK_ACTION_LINK, "alias", NULL }, - { 0, "no-drop", NULL }, -}; - enum { PROP_0, PROP_CONTENT, @@ -786,6 +774,18 @@ gdk_drag_handle_source_event (GdkEvent *event) return FALSE; } +static struct { + GdkDragAction action; + const char *name; + GdkCursor *cursor; +} drag_cursors[] = { + { 0, "default", NULL }, + { GDK_ACTION_ASK, "dnd-ask", NULL }, + { GDK_ACTION_COPY, "copy", NULL }, + { GDK_ACTION_MOVE, "move", NULL }, + { GDK_ACTION_LINK, "alias", NULL }, +}; + GdkCursor * gdk_drag_get_cursor (GdkDrag *drag, GdkDragAction action)