emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7108c4165f 1/2: Fix sending unsupported drops when there is no ta


From: Po Lu
Subject: master 7108c4165f 1/2: Fix sending unsupported drops when there is no target but a toplevel
Date: Wed, 6 Apr 2022 22:21:11 -0400 (EDT)

branch: master
commit 7108c4165f06a827492724f5ab719a04f96478da
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix sending unsupported drops when there is no target but a toplevel
    
    * src/xterm.c (handle_one_xevent): Send unsupported drops to
    last seen toplevel if no target was found.
---
 src/xterm.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/xterm.c b/src/xterm.c
index 274f1e9d9d..58a4fc6117 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]