[empathy: 1/2] CallWindow: correctly position the preview when dragging



commit fb1f95dfba027a0cb62bf94b77a429c5809f47fc
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Fri Aug 19 20:01:43 2011 +0100

    CallWindow: correctly position the preview when dragging
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656887

 src/empathy-call-window.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 8116ea7..c1cf561 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]