From 380f0443b288c68df3762ee20d78719f08dd92ff Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 24 Mar 2022 21:23:58 +0800 Subject: [PATCH] Allow fetching events from other displays inside DND * src/xterm.c (x_dnd_begin_drag_and_drop): Get the next event from the app connection instead on Xt. --- src/xterm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index d271c7190d4..7a16704d6e0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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) -- 2.39.5