diff options
author | Nikias Bassen | 2009-12-17 15:52:46 +0100 |
---|---|---|
committer | Nikias Bassen | 2009-12-17 15:52:46 +0100 |
commit | ad12235cf974e5c2b5fe7caf8ff95f784a05ec20 (patch) | |
tree | 9f65028f4d23e855b21836f5489a5bd9601e766b /src | |
parent | 1b5c9bf41b28d0832f2078899e35eec0b62821f5 (diff) | |
download | sbmanager-ad12235cf974e5c2b5fe7caf8ff95f784a05ec20.tar.gz sbmanager-ad12235cf974e5c2b5fe7caf8ff95f784a05ec20.tar.bz2 |
Only peform realignment of dock items when an item is selected
Diffstat (limited to 'src')
-rw-r--r-- | src/sbmanager.c | 18 |
1 files changed, 9 insertions, 9 deletions
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); } |