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 653066 - ClutterDragAction does not support multiple pointers
ClutterDragAction does not support multiple pointers
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-21 01:53 UTC by Peter Ward
Modified: 2011-06-22 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add multiple pointer support (1.29 KB, patch)
2011-06-21 01:54 UTC, Peter Ward
needs-work Details | Review
fix up patch per review (1.25 KB, patch)
2011-06-21 13:21 UTC, Peter Ward
committed Details | Review

Description Peter Ward 2011-06-21 01:53:18 UTC
It should look at the device which is generating the motion events, and filter out those which were not used to start the dragging.

I've attached a patch against 1.6 to fix this issue (should also apply cleanly against git master).
Comment 1 Peter Ward 2011-06-21 01:54:04 UTC
Created attachment 190331 [details] [review]
patch to add multiple pointer support
Comment 2 Emmanuele Bassi (:ebassi) 2011-06-21 13:07:19 UTC
Review of attachment 190331 [details] [review]:

looks good in principle, though it needs some work.

::: clutter/clutter-drag-action.c
@@ +79,3 @@
   ClutterDragAxis drag_axis;
 
+  gint device_id;

don't use the device id: it's not really unique and per-platform.

use the pointer: that has a higher guarantee, and you can still compare it with equality.

@@ +251,3 @@
     return FALSE;
 
+  gint device_id = clutter_event_get_device_id (event);

no C99 please - declarations should not follow statements.

@@ +309,3 @@
   priv->press_state = clutter_event_get_state (event);
 
+  priv->device_id = clutter_event_get_device_id(event);

this should just be:

  priv->device = clutter_event_get_device (event);

note the space between the function name and the (), to conform to the coding style.
Comment 3 Peter Ward 2011-06-21 13:21:46 UTC
Created attachment 190362 [details] [review]
fix up patch per review
Comment 4 Emmanuele Bassi (:ebassi) 2011-06-21 13:59:40 UTC
Review of attachment 190362 [details] [review]:

looks good.
Comment 5 Emmanuele Bassi (:ebassi) 2011-06-21 13:59:48 UTC
Review of attachment 190362 [details] [review]:

looks good.
Comment 6 Emmanuele Bassi (:ebassi) 2011-06-22 10:35:10 UTC
Attachment 190362 [details] pushes to master. Thanks for the patch!