]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix sending unsupported drops when there is no target but a toplevel
authorPo Lu <luangruo@yahoo.com>
Thu, 7 Apr 2022 02:15:12 +0000 (10:15 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 7 Apr 2022 02:15:12 +0000 (10:15 +0800)
* src/xterm.c (handle_one_xevent): Send unsupported drops to
last seen toplevel if no target was found.

src/xterm.c

index 274f1e9d9da7ed128aeaafd8bdf11968462fbe91..58a4fc6117ae7ba7ca34cb44704e90003acfb00c 100644 (file)
@@ -15549,6 +15549,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                                     event->xbutton.time);
                      }
                  }
+               else if (x_dnd_last_seen_toplevel != None)
+                 {
+                   x_set_pending_dnd_time (event->xbutton.time);
+                   x_dnd_send_unsupported_drop (dpyinfo, x_dnd_last_seen_toplevel,
+                                                event->xbutton.x_root,
+                                                event->xbutton.y_root,
+                                                event->xbutton.time);
+                 }
+
 
                x_dnd_last_protocol_version = -1;
                x_dnd_last_motif_style = XM_DRAG_STYLE_NONE;
@@ -16712,6 +16721,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                                           xev->root_x, xev->root_y, xev->time);
                            }
                        }
+                     else if (x_dnd_last_seen_toplevel != None)
+                       {
+                         x_set_pending_dnd_time (xev->time);
+                         x_dnd_send_unsupported_drop (dpyinfo,
+                                                      x_dnd_last_seen_toplevel,
+                                                      xev->root_x, xev->root_y,
+                                                      xev->time);
+                       }
 
                      x_dnd_last_protocol_version = -1;
                      x_dnd_last_motif_style = XM_DRAG_STYLE_NONE;