]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix more issues with DND state on multiple displays
authorPo Lu <luangruo@yahoo.com>
Fri, 6 May 2022 01:35:23 +0000 (09:35 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 6 May 2022 01:35:23 +0000 (09:35 +0800)
* src/xterm.c (handle_one_xevent): Don't update DND state on the
wrong display.

src/xterm.c

index 74dfc10044e35c8974c5bd831c7ceae5f463c8e4..1f3e44c553fd69f32d04d2df40d4e2493c34453c 100644 (file)
@@ -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;