]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow fetching events from other displays inside DND
authorPo Lu <luangruo@yahoo.com>
Thu, 24 Mar 2022 13:23:58 +0000 (21:23 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 24 Mar 2022 13:25:32 +0000 (21:25 +0800)
* src/xterm.c (x_dnd_begin_drag_and_drop): Get the next event
from the app connection instead on Xt.

src/xterm.c

index d271c7190d4e6548524e1131376ce1bb5810c831..7a16704d6e0e6a10828c0c52b4d3c85ab61d1de8 100644 (file)
@@ -7067,8 +7067,14 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
       current_hold_quit = &hold_quit;
 #endif
 
-#ifndef USE_GTK
+#ifdef USE_GTK
+      gtk_main_iteration ();
+#else
+#ifdef USE_X_TOOLKIT
+      XtAppNextEvent (Xt_app_con, &next_event);
+#else
       XNextEvent (FRAME_X_DISPLAY (f), &next_event);
+#endif
 
 #ifdef HAVE_X_I18N
 #ifdef HAVE_XINPUT2
@@ -7091,8 +7097,6 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
       handle_one_xevent (FRAME_DISPLAY_INFO (f),
                         &next_event, &finish, &hold_quit);
 #endif
-#else
-      gtk_main_iteration ();
 #endif
 
       if (hold_quit.kind != NO_EVENT)