x_set_dnd_targets (NULL, 0);
}
+ x_dnd_waiting_for_finish = false;
+
FRAME_DISPLAY_INFO (f)->grabbed = 0;
#ifdef USE_GTK
current_hold_quit = NULL;
if (!FRAME_VISIBLE_P (f))
error ("Frame is invisible");
- if (x_dnd_in_progress)
+ if (x_dnd_in_progress || x_dnd_waiting_for_finish)
error ("A drag-and-drop session is already in progress");
ltimestamp = x_timestamp_for_selection (FRAME_DISPLAY_INFO (f),
x_dnd_in_progress = false;
x_dnd_frame = NULL;
x_set_dnd_targets (NULL, 0);
+ x_dnd_waiting_for_finish = false;
}
FRAME_DISPLAY_INFO (f)->grabbed = 0;
FRAME_XIC (f) = ic;
#endif
x_set_dnd_targets (NULL, 0);
+ x_dnd_waiting_for_finish = false;
#ifdef USE_GTK
current_hold_quit = NULL;
f1 = x_any_window_to_frame (dpyinfo,
event->xclient.window);
- if (x_dnd_in_progress)
+ if (x_dnd_in_progress || x_dnd_waiting_for_finish)
return 0;
#ifdef USE_GTK
x_dnd_send_leave (f, x_dnd_last_seen_window);
x_dnd_in_progress = false;
+ x_dnd_waiting_for_finish = false;
x_dnd_frame = NULL;
}