From f9750383a70d85361ee32a6bcbf73a1fb630e4c5 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 21 Dec 2009 17:51:29 +0100 Subject: Made check for motion in dock_area only y-axis dependant. This prevents icons being detected 'outside the dock' when they are moved across the left, right, or bottom margin of the dock area. --- src/sbmanager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sbmanager.c b/src/sbmanager.c index 4394ebd..07b639f 100644 --- a/src/sbmanager.c +++ b/src/sbmanager.c @@ -587,7 +587,7 @@ static gboolean stage_motion (ClutterActor *actor, ClutterMotionEvent *event, gp actor_get_abs_center(clutter_actor_get_parent(selected_item->texture), ¢er_x, ¢er_y); if (selected_item->is_dock_item) { - if (clutter_actor_box_contains(&dock_area, center_x, center_y)) { + if (center_y >= dock_area.y1) { printf("icon from dock moving inside the dock!\n"); GList *found = g_list_find(dockitems, selected_item); if (!found) { @@ -599,7 +599,7 @@ static gboolean stage_motion (ClutterActor *actor, ClutterMotionEvent *event, gp } dock_align_icons(TRUE); } else { - if (clutter_actor_box_contains(&dock_area, center_x, center_y)) { + if (center_y >= dock_area.y1) { printf("regular icon is moving inside the dock!\n"); } else { printf("regular icon is moving!\n"); -- cgit v1.1-32-gdbae