After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756177 - gtk_tree_view_enable_model_drag_source doesn't set button mask
gtk_tree_view_enable_model_drag_source doesn't set button mask
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other OpenBSD
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
https://gitlab.gnome.org/GNOME/gtk/is...
Depends on:
Blocks:
 
 
Reported: 2015-10-07 11:10 UTC by Cédric Krier
Modified: 2018-04-16 09:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtktreeview patch (434 bytes, patch)
2015-10-07 11:41 UTC, Cédric Krier
none Details | Review
Demo script (4.98 KB, text/x-python)
2015-10-14 22:52 UTC, Cédric Krier
  Details

Description Cédric Krier 2015-10-07 11:10:23 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.
Comment 1 Cédric Krier 2015-10-07 11:41:38 UTC
Created attachment 312814 [details] [review]
gtktreeview patch
Comment 2 Matthias Clasen 2015-10-08 21:51:09 UTC
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 ?
Comment 3 Cédric Krier 2015-10-09 00:21:35 UTC
The drag does not begin if I don't explicitly call gtk_drag_source_set with the mask.
Comment 4 Cédric Krier 2015-10-14 22:52:43 UTC
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.
Comment 5 Matthias Clasen 2018-02-10 05:22:58 UTC
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.
Comment 6 Matthias Clasen 2018-04-15 00:29:26 UTC
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