Drag and Drop issue.



Hello.
I have added drag&drop functionnalities in a Gtk program and now I want
to change the default grab icon into a widget. I think that
gtk_drag_set_icon_widget is the function I need. But in fact, strange
thinks are happening.
I connect the "drag_begin" signal to:

void DNDBegin(GtkWidget *widget, GdkDragContext *dc, gpointer data)
{
        GtkWidget * truc= gtk_window_new( GTK_WINDOW_POPUP );
        gtk_window_set_title(GTK_WINDOW(truc),"Truc");
        gtk_widget_realize(truc);
        gtk_drag_set_icon_widget(dc,truc,0,0);
}

And as a result, I saw my widget, but the default grab icon replaces it
(nearly) instantaneously. I don't have any warning so I don't know
what's happening. If anyone has a clue, thanks for help!

Clement.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]