target to convert one of the special selections XmTRANSFER_SUCCESS
or XmTRANSFER_FAILURE. */
static int x_dnd_waiting_for_motif_finish;
+static bool x_dnd_xm_use_help;
static Window x_dnd_pending_finish_target;
static int x_dnd_waiting_for_finish_proto;
static bool x_dnd_allow_current_frame;
#define XM_DRAG_LINK (1L << 2)
#define XM_DROP_ACTION_DROP 0
-/* #define XM_DROP_ACTION_DROP_HELP 1 */
+#define XM_DROP_ACTION_DROP_HELP 1
#define XM_DROP_ACTION_DROP_CANCEL 2
#define XM_DRAG_REASON(originator, code) ((code) | ((originator) << 7))
x_dnd_return_frame = 0;
x_dnd_waiting_for_finish = false;
x_dnd_waiting_for_motif_finish = 0;
+ x_dnd_xm_use_help = false;
x_dnd_end_window = None;
x_dnd_use_toplevels
= x_wm_supports (f, FRAME_DISPLAY_INFO (f)->Xatom_net_client_list_stacking);
}
if (status != XM_DROP_SITE_VALID
- || action == XM_DROP_ACTION_DROP_CANCEL)
+ || (action == XM_DROP_ACTION_DROP_CANCEL
+ || action == XM_DROP_ACTION_DROP_HELP))
{
x_dnd_waiting_for_finish = false;
goto OTHER;
&compose_status);
#endif
+#ifdef XK_F1
+ if (x_dnd_in_progress && keysym == XK_F1)
+ {
+ x_dnd_xm_use_help = true;
+ goto done_keysym;
+ }
+#endif
+
/* If not using XIM/XIC, and a compose sequence is in progress,
we break here. Otherwise, chars_matched is always 0. */
if (compose_status.chars_matched > 0 && nbytes == 0)
= XM_DRAG_SIDE_EFFECT (xm_side_effect_from_action (dpyinfo,
x_dnd_wanted_action),
XM_DROP_SITE_VALID, XM_DRAG_NOOP,
- XM_DROP_ACTION_DROP);
+ (x_dnd_xm_use_help
+ ? XM_DROP_ACTION_DROP
+ : XM_DROP_ACTION_DROP_HELP));
dmsg.timestamp = event->xbutton.time;
dmsg.x = event->xbutton.x_root;
dmsg.y = event->xbutton.y_root;
XM_DROP_SITE_VALID,
xm_side_effect_from_action (dpyinfo,
x_dnd_wanted_action),
- XM_DROP_ACTION_DROP);
+ (x_dnd_xm_use_help
+ ? XM_DROP_ACTION_DROP
+ : XM_DROP_ACTION_DROP_HELP));
dmsg.timestamp = xev->time;
dmsg.x = lrint (xev->root_x);
dmsg.y = lrint (xev->root_y);
}
}
+#ifdef XK_F1
+ if (x_dnd_in_progress && keysym == XK_F1)
+ {
+ x_dnd_xm_use_help = true;
+ goto xi_done_keysym;
+ }
+#endif
+
/* First deal with keysyms which have defined
translations to characters. */
if (keysym >= 32 && keysym < 128)