From: Po Lu Date: Sat, 30 Apr 2022 00:47:42 +0000 (+0800) Subject: Check display when handling XdndFinished events X-Git-Tag: emacs-29.0.90~1931^2~212 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94ecd2b3c664387cd703fb639d6909a9e6bf551b;p=emacs.git Check display when handling XdndFinished events * src/xterm.c (handle_one_xevent): Check that the display is actually the one we want before finishing DND. --- diff --git a/src/xterm.c b/src/xterm.c index 51828795c5f..28c435afde3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -14077,6 +14077,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (event->xclient.message_type == dpyinfo->Xatom_XdndFinished && (x_dnd_waiting_for_finish && !x_dnd_waiting_for_motif_finish) + /* Also check that the display is correct, since + `x_dnd_pending_finish_target' could still be valid on + another X server. */ + && dpyinfo->display == x_dnd_finish_display && event->xclient.data.l[0] == x_dnd_pending_finish_target) { x_dnd_waiting_for_finish = false;