@@ -55,6 +55,15 @@ namespace Gala {
5555 */
5656 public signal void destination_crossed (Clutter .Actor destination , bool hovered );
5757
58+ /**
59+ * Emitted on the source when we are hovering over a destination.
60+ *
61+ * @param destination The destination actor that we are hovering over
62+ * @param x The x coordinate relative to the destination actor
63+ * @param y The y coordinate relative to the destination actor
64+ */
65+ public signal void destination_motion (Clutter .Actor destination , float x , float y );
66+
5867 /**
5968 * The source has been clicked, but the movement was not larger than
6069 * the drag threshold. Useful if the source is also activatable.
@@ -341,7 +350,7 @@ namespace Gala {
341350 last_y = y;
342351
343352 var stage = actor. get_stage ();
344- var actor = stage. get_actor_at_pos (Clutter . PickMode . REACTIVE , (int ) x, (int ) y);
353+ var actor = stage. get_actor_at_pos (NONE , (int ) x, (int ) y);
345354 DragDropAction action = null ;
346355 // if we're allowed to bubble and this actor is not a destination, check its parents
347356 if (actor != null && (action = get_drag_drop_action (actor)) == null && allow_bubbling) {
@@ -352,8 +361,12 @@ namespace Gala {
352361 }
353362
354363 // didn't change, no need to do anything
355- if (actor == hovered)
364+ if (actor == hovered) {
365+ if (hovered != null ) {
366+ destination_motion (hovered, x - hovered. x, y - hovered. y);
367+ }
356368 return Clutter . EVENT_STOP ;
369+ }
357370
358371 if (action == null ) {
359372 // apparently we left ours if we had one before
@@ -436,12 +449,12 @@ namespace Gala {
436449 }
437450
438451 private void finish () {
452+ drag_end (hovered);
453+
439454 // make sure they reset the style or whatever they changed when hovered
440455 emit_crossed (hovered, false );
441456
442457 cleanup ();
443-
444- drag_end (hovered);
445458 }
446459
447460 private void cleanup () {
0 commit comments