]> git.eshelyaron.com Git - emacs.git/commitdiff
Return an appropriate action when performing unsupported drop
authorPo Lu <luangruo@yahoo.com>
Thu, 7 Apr 2022 00:55:00 +0000 (08:55 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 7 Apr 2022 00:55:00 +0000 (08:55 +0800)
* src/xterm.c (x_dnd_send_unsupported_drop): Set action to
XdndActionPrivate.

src/xterm.c

index 3b0416722b0f5e76eaa92ff03e3d0b28ffb3e8bb..274f1e9d9da7ed128aeaafd8bdf11968462fbe91 100644 (file)
@@ -952,7 +952,10 @@ static XRectangle x_dnd_mouse_rect;
    XdndStatus messages from the drop target.
 
    Under Motif, this is changed upon receiving a XmDROP_START message
-   in reply to our own.  */
+   in reply to our own.
+
+   When dropping on a target that doesn't support any drag-and-drop
+   protocol, this is set to the atom XdndActionPrivate.  */
 static Atom x_dnd_action;
 
 /* The action we want the drop target to perform.  The drop target may
@@ -2897,6 +2900,8 @@ x_dnd_send_unsupported_drop (struct x_display_info *dpyinfo, Window target_windo
                      x_dnd_n_targets, atom_names))
       return;
 
+  x_dnd_action = dpyinfo->Xatom_XdndActionPrivate;
+
   for (i = x_dnd_n_targets; i > 0; --i)
     {
       targets = Fcons (build_string (atom_names[i - 1]),