/* Enumeration for some targets we handle internally */
enum {
- TARGET_MOTIF_SUCCESS = 0x40000000,
- TARGET_MOTIF_FAILURE,
TARGET_DELETE
};
result = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_screen (GTK_WINDOW (result), screen);
gtk_window_resize (GTK_WINDOW (result), 1, 1);
- gtk_window_move (GTK_WINDOW (result), -100, -100);
+ gtk_window_move (GTK_WINDOW (result), -99, -99);
gtk_widget_show (result);
}
if ((ev->type == KeyPress || ev->type == KeyRelease) &&
ev->xkey.root == ev->xkey.window)
ev->xkey.window = (Window)data;
+ else if (ev->type == GenericEvent)
+ {
+ XGenericEventCookie *cookie;
+ XIDeviceEvent *dev;
+
+ cookie = &ev->xcookie;
+ dev = (XIDeviceEvent *) cookie->data;
+
+ if (dev->evtype == XI_KeyPress ||
+ dev->evtype == XI_KeyRelease)
+ dev->event = (Window)data;
+ }
return GDK_FILTER_CONTINUE;
}
{
target = gdk_atom_intern_static_string ("DELETE");
}
- else if (gdk_drag_context_get_protocol (context) == GDK_DRAG_PROTO_MOTIF)
- {
- target = gdk_atom_intern_static_string (success ?
- "XmTRANSFER_SUCCESS" :
- "XmTRANSFER_FAILURE");
- }
if (target != GDK_NONE)
{
else if (event->type == GDK_DROP_START && !info->proxy_source)
{
gdk_drop_reply (context, found, event->dnd.time);
- if ((gdk_drag_context_get_protocol (context) == GDK_DRAG_PROTO_MOTIF) && !found)
- gtk_drag_finish (context, FALSE, FALSE, event->dnd.time);
}
}
break;
{
gboolean result = gdk_drag_context_get_selected_action (context) != 0;
- /* Aha - we can finally pass the MOTIF DROP on... */
+ /* Aha - we can finally pass the DROP on... */
gdk_drop_reply (info->proxy_dest->context, result, info->proxy_dest->proxy_drop_time);
if (result)
gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
pair->info);
tmp_list = tmp_list->next;
}
-
- if (gdk_drag_context_get_protocol (info->context) == GDK_DRAG_PROTO_MOTIF)
- {
- gtk_selection_add_target (info->ipc_widget,
- selection,
- gdk_atom_intern_static_string ("XmTRANSFER_SUCCESS"),
- TARGET_MOTIF_SUCCESS);
- gtk_selection_add_target (info->ipc_widget,
- selection,
- gdk_atom_intern_static_string ("XmTRANSFER_FAILURE"),
- TARGET_MOTIF_FAILURE);
- }
gtk_selection_add_target (info->ipc_widget,
selection,
info->context);
gtk_selection_data_set (selection_data, null_atom, 8, NULL, 0);
break;
- case TARGET_MOTIF_SUCCESS:
- gtk_drag_drop_finished (info, GTK_DRAG_RESULT_SUCCESS, time);
- gtk_selection_data_set (selection_data, null_atom, 8, NULL, 0);
- break;
- case TARGET_MOTIF_FAILURE:
- gtk_drag_drop_finished (info, GTK_DRAG_RESULT_NO_TARGET, time);
- gtk_selection_data_set (selection_data, null_atom, 8, NULL, 0);
- break;
default:
if (info->proxy_dest)
{