]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Motif DND return value upon transfer failure
authorPo Lu <luangruo@yahoo.com>
Wed, 1 Jun 2022 10:24:05 +0000 (18:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 1 Jun 2022 10:24:05 +0000 (18:24 +0800)
* src/xterm.c (handle_one_xevent): Make XmTRANSFER_FAILURE clear
DND action.

src/xterm.c

index 853396199350c2cb21566c5210a5589a4681e035..484637807aacf50f99b3c23462737fca2758d9c2 100644 (file)
@@ -15502,7 +15502,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            && eventp->selection == dpyinfo->Xatom_XdndSelection
            && (eventp->target == dpyinfo->Xatom_XmTRANSFER_SUCCESS
                || eventp->target == dpyinfo->Xatom_XmTRANSFER_FAILURE))
-         x_dnd_waiting_for_finish = false;
+         {
+           x_dnd_waiting_for_finish = false;
+
+           /* If the transfer failed, then return nil from
+              `x-begin-drag'.  */
+           if (eventp->target == dpyinfo->Xatom_XmTRANSFER_FAILURE)
+             x_dnd_action = None;
+         }
       }
       break;