From: Po Lu Date: Wed, 1 Jun 2022 10:24:05 +0000 (+0800) Subject: Fix Motif DND return value upon transfer failure X-Git-Tag: emacs-29.0.90~1910^2~295^2~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9bb2d7f4ec47bd3a19df8ceaa43d0ad36dbf9b3;p=emacs.git Fix Motif DND return value upon transfer failure * src/xterm.c (handle_one_xevent): Make XmTRANSFER_FAILURE clear DND action. --- diff --git a/src/xterm.c b/src/xterm.c index 85339619935..484637807aa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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;