From ad12235cf974e5c2b5fe7caf8ff95f784a05ec20 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 17 Dec 2009 15:52:46 +0100 Subject: Only peform realignment of dock items when an item is selected --- src/sbmanager.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/sbmanager.c b/src/sbmanager.c index ad736c4..ceeafab 100644 --- a/src/sbmanager.c +++ b/src/sbmanager.c @@ -387,15 +387,15 @@ static void dock_align_icons() } if (item != selected_item) { - ClutterActorBox box; - clutter_actor_get_allocation_box(icon, &box); - //printf("box: %f,%f, %f,%f\n", box.x1,box.y1, box.x2,box.y2); - if (clutter_actor_box_contains(&box, cx+(60.0-spacing), cy)) { - printf("move item %d\n", i); - xpos += 60.0; - xpos += spacing; - } else { - printf("no!\n"); + if (selected_item) { + ClutterActorBox box; + clutter_actor_get_allocation_box(icon, &box); + //printf("box: %f,%f, %f,%f\n", box.x1,box.y1, box.x2,box.y2); + if (clutter_actor_box_contains(&box, cx+(60.0-spacing), cy)) { + printf("move item %d\n", i); + xpos += 60.0; + xpos += spacing; + } } clutter_actor_set_position(icon, xpos, ypos); } -- cgit v1.1-32-gdbae