for (; CONSP (targets); targets = XCDR (targets))
{
CHECK_STRING (XCAR (targets));
+ maybe_quit ();
if (ntargets < 2048)
{
- target_names[ntargets] = SSDATA (XCAR (targets));
+ scratch = SSDATA (XCAR (targets));
+ len = strlen (scratch);
+ target_names[ntargets] = SAFE_ALLOCA (len + 1);
+ strncpy (target_names[ntargets], scratch, len + 1);;
ntargets++;
}
else
xaction = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionLink;
else if (EQ (action, QXdndActionPrivate))
xaction = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionPrivate;
+ else if (EQ (action, QXdndActionAsk))
+ xaction = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionAsk;
else if (CONSP (action))
{
xaction = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionAsk;
CHECK_LIST (action);
for (; CONSP (action); action = XCDR (action))
{
+ maybe_quit ();
tem = XCAR (action);
CHECK_CONS (tem);
t1 = XCAR (tem);
action_list[nnames] = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionMove;
else if (EQ (t1, QXdndActionLink))
action_list[nnames] = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionLink;
+ else if (EQ (t1, QXdndActionAsk))
+ action_list[nnames] = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionAsk;
else if (EQ (t1, QXdndActionPrivate))
action_list[nnames] = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionPrivate;
else
PropModeReplace, (unsigned char *) ask_action_list,
n_ask_actions);
}
+ else
+ {
+ /* Delete those two properties, since some clients look at them
+ and not the action to decide whether or not the user should
+ be prompted to select an action. */
+
+ XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ FRAME_DISPLAY_INFO (f)->Xatom_XdndActionList);
+ XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ FRAME_DISPLAY_INFO (f)->Xatom_XdndActionDescription);
+ }
x_dnd_in_progress = true;
x_dnd_frame = f;