]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix x_dnd_movement_frame detection on GTK builds
authorPo Lu <luangruo@yahoo.com>
Sat, 28 May 2022 00:55:13 +0000 (08:55 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 28 May 2022 00:55:13 +0000 (08:55 +0800)
* src/xterm.c (x_dnd_begin_drag_and_drop): Make sure movement
frame is on the correct display.

src/xterm.c

index efa153efca1776d4fa35cf3d2e6a149f18d3d7ff..756f0308111cf589f28aa9f8a861abcdf7814fc7 100644 (file)
@@ -10637,7 +10637,11 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
       if (event_display == FRAME_DISPLAY_INFO (f))
        {
 #endif
-         if (x_dnd_movement_frame)
+         if (x_dnd_movement_frame
+             /* FIXME: how come this can end up with movement frames
+                from other displays on GTK builds?  */
+             && (FRAME_X_DISPLAY (x_dnd_movement_frame)
+                 == FRAME_X_DISPLAY (f)))
            {
              XSETFRAME (frame_object, x_dnd_movement_frame);
              XSETINT (x, x_dnd_movement_x);