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 681746 - Drag handle misplacemente in examples/drag-action
Drag handle misplacemente in examples/drag-action
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterAction
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-13 10:10 UTC by Emanuele Aina
Modified: 2012-08-27 15:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
drag-action: fix press coords transform with drag_handle (1.58 KB, patch)
2012-08-13 10:13 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2012-08-13 10:10:25 UTC
Shift+click on the examples/drag-action square will position the drag handle under the mouse but, as soon as the mouse move the drag handle will be moved to position of the original actor.

This is due to the fact that the coordinates of the press event that triggered the drag are always transformed with the main actor as reference, event if a drag-handle is set.
Comment 1 Emanuele Aina 2012-08-13 10:13:40 UTC
Created attachment 220985 [details] [review]
drag-action: fix press coords transform with drag_handle

When setting a drag handle, transform the original press
coordinates using the drag handle as reference instead of the
associated actor.

This causes the initial misplacement of drag handle in
example/drag-action when holding down the Shift key: the handle
gets placed at the main actor origin on the first drag event,
instead of following the mouse pointer.

All subsequent motion events already use the right actor when
transforming the coordinates, thus they are not affected.
Comment 2 Emmanuele Bassi (:ebassi) 2012-08-13 10:28:38 UTC
Review of attachment 220985 [details] [review]:

looks good, thanks for the patch!
Comment 3 Emmanuele Bassi (:ebassi) 2012-08-27 15:47:16 UTC
Attachment 220985 [details] pushed as 59801ef - drag-action: fix press coords transform with drag_handle