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 735965 - rubberband selection broken
rubberband selection broken
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkGesture
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-09-03 12:16 UTC by Matthias Clasen
Modified: 2014-09-04 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dnd: Make the drag gesture obey the button mask specified (2.72 KB, patch)
2014-09-04 12:00 UTC, Carlos Garnacho
committed Details | Review
treeview: Run the row dragging gesture on the bubble phase (1.23 KB, patch)
2014-09-04 12:00 UTC, Carlos Garnacho
committed Details | Review

Description Matthias Clasen 2014-09-03 12:16:31 UTC
We explicitly added rubberband selection in gnome-documents at some point to make mouse users live easier; this seems broken in 3.13.90 - gesture fallout ?
Comment 1 Carlos Garnacho 2014-09-04 11:30:42 UTC
This effectively was gesture fallout, the builtin DnD gesture in gtkdnd.c was triggered with buttons it didn't intend to, moving to gtk+
Comment 2 Carlos Garnacho 2014-09-04 12:00:52 UTC
Created attachment 285356 [details] [review]
dnd: Make the drag gesture obey the button mask specified

This was forgotten when making DnD use a GtkGesture in the handlers
attached to the widget in gtk_drag_source_set(). The gesture must obey
the specified button mask, and switch to denied state if the pressed
button isn't part of the given mask.
Comment 3 Carlos Garnacho 2014-09-04 12:00:58 UTC
Created attachment 285357 [details] [review]
treeview: Run the row dragging gesture on the bubble phase

This is so signal handlers have an opportunity to undo its effect by
returning GDK_EVENT_STOP on ::button-press-event, just like they used
to do pre-gestures.
Comment 4 Matthias Clasen 2014-09-04 12:04:35 UTC
Review of attachment 285356 [details] [review]:

sure
Comment 5 Matthias Clasen 2014-09-04 12:05:06 UTC
Review of attachment 285357 [details] [review]:

ok
Comment 6 Matthias Clasen 2014-09-04 12:05:39 UTC
Do we need the same fix in the icon view ? Thats where I noticed the problem initially...
Comment 7 Carlos Garnacho 2014-09-04 12:46:26 UTC
(In reply to comment #6)
> Do we need the same fix in the icon view ? Thats where I noticed the problem
> initially...

icon view is one of the few major icons not ported yet to GtkGestures. it was failing only due to the issue in the first patch, gtk_icon_view_enable_model_drag_source() would set a 0 button mask to gtk_drag_source_set(), and then start it itself on motion_notify. The DnD code was ignoring the 0 button mask, so even if the button press emission was stopped before the icon view handler, the DnD attached handlers would still run first due to g_signal_connect() ordering.

As for the second patch, the treeview was always capturing those events, so it was calling gtk_drag_begin() even before the gtkdnd handlers did.

Clearly, everything was too eager at starting DnD...
Comment 8 Carlos Garnacho 2014-09-04 13:07:04 UTC
Attachment 285356 [details] pushed as 6f53895 - dnd: Make the drag gesture obey the button mask specified
Attachment 285357 [details] pushed as bf8f824 - treeview: Run the row dragging gesture on the bubble phase