GNOME Bugzilla – Bug 756177
gtk_tree_view_enable_model_drag_source doesn't set button mask
Last modified: 2018-04-16 09:15:04 UTC
gtk_tree_view_enable_model_drag_source calls gtk_drag_source_set but with a mask of 0 instead of the start_button_mask. This makes required to call again gtk_drag_source_set with the right mask when the view is used with a custom Model.
Created attachment 312814 [details] [review] gtktreeview patch
Not sure what a custom model has to do with it... the treeview itself is using the button mask to check whether to begin a drag, in gtk_tree_view_maybe_begin_dragging_row. What problem are you are seeing that is fixed by this patch ?
The drag does not begin if I don't explicitly call gtk_drag_source_set with the mask.
Created attachment 313341 [details] Demo script Here is a demo python script (based on pygtk tutorial) that shows how drag doesn't start if the lines 111-112 are not uncommented. By the way, this only happens when you use a GenericTreeModel.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new