From: Po Lu Date: Thu, 31 Mar 2022 10:52:01 +0000 (+0800) Subject: Minor fixes to treatment of `allow_current_frame' X-Git-Tag: emacs-29.0.90~1931^2~852 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce1f7f2467a59924134a89f61debd5a0a59a73ea;p=emacs.git 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. --- diff --git a/src/xterm.c b/src/xterm.c index 6a19828a36a..81b84c8609c 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)