GtkCTree drag bug workaround



Time ago I asked a question on this list and noone knew the answer. So now I 
am sending a bug workaround to help whoever might confront the same problem.

If you create a gtkctree and do a gtk_drag_source_set() from the start, what 
happens is that the first drag it receives from another gtk application will 
mistakenly start a drag on the gtkctree destination widget, without 
generating any of the signals. This only happens until the first "real" drag 
is initiated and finished in the offending gtkctree. And it will happen again 
after a expand or contract event.

The workaround is to tie a signal to the buttonpress event, so that 
gtk_drag_source_set() is called with the buttonpress. And call 
gtk_drag_source_unset() on expand and contract events. 

Whether each gtk_drag_source_set() should be matched by a 
gtk_drag_source_unset(), I am not sure whether it is important or not.


Edscott



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