From e2fcbd8dbd091bb72915297c92a801cbe66f13c9 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 6 May 2022 09:35:23 +0800 Subject: [PATCH] Fix more issues with DND state on multiple displays * src/xterm.c (handle_one_xevent): Don't update DND state on the wrong display. --- src/xterm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 74dfc10044e..1f3e44c553f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -15002,7 +15002,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, popup_activated_flag = 1; #endif - if (x_dnd_in_progress) + if (x_dnd_in_progress + && dpyinfo == FRAME_DISPLAY_INFO (x_dnd_frame)) x_dnd_update_state (dpyinfo, dpyinfo->last_user_time); if (x_dnd_in_progress && x_dnd_use_toplevels @@ -16267,7 +16268,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, } - if (x_dnd_in_progress) + if (x_dnd_in_progress + && dpyinfo == FRAME_DISPLAY_INFO (x_dnd_frame)) x_dnd_update_state (dpyinfo, dpyinfo->last_user_time); goto OTHER; @@ -16651,7 +16653,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, break; case CirculateNotify: - if (x_dnd_in_progress) + if (x_dnd_in_progress + && dpyinfo == FRAME_DISPLAY_INFO (x_dnd_frame)) x_dnd_update_state (dpyinfo, dpyinfo->last_user_time); goto OTHER; -- 2.39.5