aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-20 03:01:43 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-20 03:01:43 +0800
commitfb1f95dfba027a0cb62bf94b77a429c5809f47fc (patch)
tree476abd92d36a56bb09f1c9a4c8c885433456e03d
parent376c8299f4c69345fd783b20a8f2f4d8827551bb (diff)
downloadgsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.tar
gsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.tar.gz
gsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.tar.bz2
gsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.tar.lz
gsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.tar.xz
gsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.tar.zst
gsoc2013-empathy-fb1f95dfba027a0cb62bf94b77a429c5809f47fc.zip
CallWindow: correctly position the preview when dragging
https://bugzilla.gnome.org/show_bug.cgi?id=656887
-rw-r--r--src/empathy-call-window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 8116ea79d..c1cf56141 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -874,9 +874,14 @@ empathy_call_window_preview_on_drag_begin_cb (ClutterDragAction *action,
{
ClutterActor *stage = clutter_actor_get_stage (actor);
ClutterActor *preview = clutter_clone_new (actor);
+ gfloat rel_x, rel_y;
clutter_container_add_actor (CLUTTER_CONTAINER (stage), preview);
- clutter_actor_set_position (preview, event_x, event_y);
+
+ clutter_actor_transform_stage_point (actor, event_x, event_y,
+ &rel_x, &rel_y);
+
+ clutter_actor_set_position (preview, event_x - rel_x, event_y - rel_y);
clutter_drag_action_set_drag_handle (action, preview);