[Q] Properly overriding dnd default behaviour ?



  Hi,

When you use gtk_drag_source_set() on a widget, it connects 
"button_press_event" and "motion_notify_event" to 
gtk_drag_source_event_cb(). So you have no control on when the 
"drag_begin" signal is triggered (you may want to have a different 
threshold or use a timer, for instance).

I've overriden all that by writing my own gtk_drag_source_set() and 
gtk_drag_source_event_cb(), but this way I have to use private gtk 
structures (for registering dnd site).

Is there a cleaner way to achieve the same goal ?
Shouldn't gtk_drag_source_set() get another argument, which would 
be a pointer to our own handler ? A NULL pointer would mean to use 
the default behaviour (gtk_drag_source_event_cb) in that case.

Any thought ?
Renaud



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