static void *grab_view = NULL;
static BLocker grab_view_locker;
+static bool drag_and_drop_in_progress;
/* This could be a private API, but it's used by (at least) the Qt
port, so it's probably here to stay. */
resume_thread (infos[1].object);
unblock_input_function ();
+ drag_and_drop_in_progress = true;
+
while (true)
{
block_input_function ();
process_pending_signals_function ();
if (should_quit_function ())
- return true;
+ {
+ drag_and_drop_in_progress = false;
+ return true;
+ }
if (infos[1].events & B_EVENT_INVALID)
- return false;
+ {
+ drag_and_drop_in_progress = false;
+ return false;
+ }
infos[0].events = B_EVENT_READ;
infos[1].events = B_EVENT_INVALID;
}
}
+
+bool
+be_drag_and_drop_in_progress (void)
+{
+ return drag_and_drop_in_progress;
+}
void (*process_pending_signals_function) (void),
bool (*should_quit_function) (void));
+ extern bool
+ be_drag_and_drop_in_progress (void);
+
#ifdef __cplusplus
extern void *
find_appropriate_view_for_draw (void *vw);
another program is dragging stuff over us. */
do_help = -1;
- inev.kind = DRAG_N_DROP_EVENT;
- inev.arg = Qlambda;
- XSETINT (inev.x, b->x);
- XSETINT (inev.y, b->y);
- XSETFRAME (inev.frame_or_window, f);
+ if (!be_drag_and_drop_in_progress ())
+ {
+ inev.kind = DRAG_N_DROP_EVENT;
+ inev.arg = Qlambda;
+
+ XSETINT (inev.x, b->x);
+ XSETINT (inev.y, b->y);
+ XSETFRAME (inev.frame_or_window, f);
+ }
break;
}
}