Question on DnD
- From: Halton Huo <Halton Huo Sun COM>
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Question on DnD
- Date: Fri, 15 Aug 2008 19:32:35 +0800
Hi,
I'm wring a DnD feature, most knowledge is from
http://live.gnome.org/GnomeLove/DragNDropTutorial
I want to check whether action is GDK_ACTION_MOVE during "drag-begin"
phase, if yes, end this DnD. Unfortunately, I found that context->action
is always 0 during "drag-begin" even SHIFT is hold. While it will be 4
(GDK_ACTION_MOVE) during "drag-data-get" phase.
static void
drag_begin (GtkWidget *widget,
GdkDragContext *context,
gpointer user_data)
{
g_warning ("%s %d", __func__, context->action);
if (context->action == GDK_ACTION_MOVE)
gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
}
static void
drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection,
guint info,
guint time,
gpointer user_data)
{
g_warning ("%s %d", __func__, context->action);
}
Is it a know bug for gtk+ or just I wrongly use API?
Thanks,
Halton.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]