From 69d3a84c8326e12a37d4f4f5acd7616b35143335 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 12 May 2022 09:07:59 +0800 Subject: [PATCH] Only handle SelectionRequest events from the DND display during DND * src/xterm.c (handle_one_xevent): Handle only SelectionRequest events from the DND frame's display via hold_quit. --- src/xterm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index a250fce9b09..1c2b727c0f8 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -14794,7 +14794,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, events immediately, by setting hold_quit to the input event. */ - if (x_dnd_in_progress || x_dnd_waiting_for_finish) + if ((x_dnd_in_progress + && dpyinfo == FRAME_DISPLAY_INFO (x_dnd_frame)) + || (x_dnd_waiting_for_finish + && dpyinfo->display == x_dnd_finish_display)) { eassume (hold_quit); -- 2.39.2