emacs-diffs
[Top][All Lists]
Advanced

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

master ce1f7f2467: Minor fixes to treatment of `allow_current_frame'


From: Po Lu
Subject: master ce1f7f2467: Minor fixes to treatment of `allow_current_frame'
Date: Thu, 31 Mar 2022 06:52:49 -0400 (EDT)

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

    Minor fixes to treatment of `allow_current_frame'
    
    * src/xterm.c (x_dnd_send_drop): Don't send special event for
    wrong frame.
    (x_dnd_send_drop): Fix condition for returning
    XdndActionPrivate.
---
 src/xterm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/xterm.c b/src/xterm.c
index 6a19828a36..81b84c8609 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2502,6 +2502,10 @@ x_dnd_send_drop (struct frame *f, Window target, Time 
timestamp,
 
   if (self_frame)
     {
+      if (!x_dnd_allow_current_frame
+         && self_frame == x_dnd_frame)
+       return false;
+
       /* Send a special drag-and-drop event when dropping on top of an
         Emacs frame to avoid all the overhead involved with sending
         client events.  */
@@ -8625,7 +8629,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, 
Atom xaction,
   if (x_dnd_end_window != None
       && (any = x_any_window_to_frame (FRAME_DISPLAY_INFO (f),
                                       x_dnd_end_window))
-      && (any != f))
+      && (allow_current_frame || any != f))
     return QXdndActionPrivate;
 
   if (x_dnd_action != None)



reply via email to

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