From 021dbdb1287de0f5502eac00fee8d43b8d22db55 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 23 Mar 2022 11:14:13 +0800 Subject: [PATCH] * src/xterm.c (x_dnd_begin_drag_and_drop): Fix test against DND frame. --- src/xterm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 3d0d8264092..e4c17644e42 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6949,8 +6949,8 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, int finish; #endif XWindowAttributes root_window_attrs; - struct input_event hold_quit; + struct frame *any; char *atom_name; Lisp_Object action, ltimestamp; specpdl_ref ref; @@ -7110,8 +7110,9 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, loop, so when dragging items to itself, always return XdndActionPrivate. */ if (x_dnd_end_window != None - && (x_any_window_to_frame (FRAME_DISPLAY_INFO (f), - x_dnd_end_window) != f)) + && (any = x_any_window_to_frame (FRAME_DISPLAY_INFO (f), + x_dnd_end_window)) + && (any != f)) return QXdndActionPrivate; if (x_dnd_action != None) -- 2.39.5