]> git.eshelyaron.com Git - emacs.git/commitdiff
Check display when handling XdndFinished events
authorPo Lu <luangruo@yahoo.com>
Sat, 30 Apr 2022 00:47:42 +0000 (08:47 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 30 Apr 2022 00:47:42 +0000 (08:47 +0800)
* src/xterm.c (handle_one_xevent): Check that the display is
actually the one we want before finishing DND.

src/xterm.c

index 51828795c5fb082c78837994bd6590385ac3dc2e..28c435afde3833e1f91a9aa06fcc78470afccc75 100644 (file)
@@ -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;