x_uncatch_errors ();
}
-static void
+static bool
x_dnd_send_drop (struct frame *f, Window target, Time timestamp,
int supported)
{
x_dnd_n_targets, atom_names))
{
XFree (name);
- return;
+ return false;
}
for (i = x_dnd_n_targets; i != 0; --i)
XFree (name);
kbd_buffer_store_event (&ie);
- return;
+ return false;
}
}
+ else if (x_dnd_action == None)
+ {
+ x_dnd_send_leave (f, target);
+ return false;
+ }
msg.xclient.type = ClientMessage;
msg.xclient.message_type = dpyinfo->Xatom_XdndDrop;
x_catch_errors (dpyinfo->display);
XSendEvent (FRAME_X_DISPLAY (f), target, False, 0, &msg);
x_uncatch_errors ();
+ return true;
}
void
if (x_dnd_last_seen_window != None
&& x_dnd_last_protocol_version != -1)
{
- /* Crazy hack to make dragging from one frame to
- another work. */
- x_dnd_waiting_for_finish = !x_any_window_to_frame (dpyinfo,
- x_dnd_last_seen_window);
x_dnd_pending_finish_target = x_dnd_last_seen_window;
x_dnd_waiting_for_finish_proto = x_dnd_last_protocol_version;
- x_dnd_send_drop (x_dnd_frame, x_dnd_last_seen_window,
- x_dnd_selection_timestamp,
- x_dnd_last_protocol_version);
+ x_dnd_waiting_for_finish
+ = x_dnd_send_drop (x_dnd_frame, x_dnd_last_seen_window,
+ x_dnd_selection_timestamp,
+ x_dnd_last_protocol_version);
}
x_dnd_last_protocol_version = -1;
if (x_dnd_last_seen_window != None
&& x_dnd_last_protocol_version != -1)
{
- x_dnd_waiting_for_finish = !x_any_window_to_frame (dpyinfo,
- x_dnd_last_seen_window);
x_dnd_pending_finish_target = x_dnd_last_seen_window;
x_dnd_waiting_for_finish_proto = x_dnd_last_protocol_version;
- x_dnd_send_drop (x_dnd_frame, x_dnd_last_seen_window,
- x_dnd_selection_timestamp,
- x_dnd_last_protocol_version);
+ x_dnd_waiting_for_finish
+ = x_dnd_send_drop (x_dnd_frame, x_dnd_last_seen_window,
+ x_dnd_selection_timestamp,
+ x_dnd_last_protocol_version);
}
x_dnd_last_protocol_version = -1;