summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-12-21 23:59:32 +0100
committerGravatar Nikias Bassen2009-12-21 23:59:32 +0100
commitddc57062079d37b10d8449a1987e174d4912ee24 (patch)
tree14421ce9249d6b820607d0dbbfe979a7fb63bf4f
parent8f9eb21a383a83c57621b3aeb7be7e95c257f21a (diff)
downloadsbmanager-ddc57062079d37b10d8449a1987e174d4912ee24.tar.gz
sbmanager-ddc57062079d37b10d8449a1987e174d4912ee24.tar.bz2
Fix icon movement for multiple pages
Signed-off-by: Nikias Bassen <nikias@gmx.li>
-rw-r--r--src/sbmanager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sbmanager.c b/src/sbmanager.c
index 267fb2a..82b6cbd 100644
--- a/src/sbmanager.c
+++ b/src/sbmanager.c
@@ -380,7 +380,7 @@ static gboolean item_button_press (ClutterActor *actor, ClutterButtonEvent *even
diffx = dock_area.x1;
diffy = dock_area.y1;
} else {
- diffx = sb_area.x1;
+ diffx = sb_area.x1 - (current_page*STAGE_WIDTH);
diffy = sb_area.y1;
}
clutter_actor_reparent(sc, stage);
@@ -430,7 +430,7 @@ static gboolean item_button_release (ClutterActor *actor, ClutterButtonEvent *ev
clutter_actor_set_position(sc, clutter_actor_get_x(sc) - dock_area.x1, clutter_actor_get_y(sc) - dock_area.y1);
} else {
clutter_actor_reparent(sc, the_sb);
- clutter_actor_set_position(sc, clutter_actor_get_x(sc) - sb_area.x1, clutter_actor_get_y(sc) - sb_area.y1);
+ clutter_actor_set_position(sc, clutter_actor_get_x(sc) + (current_page*STAGE_WIDTH) - sb_area.x1, clutter_actor_get_y(sc) - sb_area.y1);
}
}
@@ -577,7 +577,7 @@ static gboolean stage_motion (ClutterActor *actor, ClutterMotionEvent *event, gp
return FALSE;
}
- clutter_actor_move_by(clutter_actor_get_parent(selected_item->texture), (event->x - start_x), event->y - start_y);
+ clutter_actor_move_by(clutter_actor_get_parent(selected_item->texture), (event->x - start_x), (event->y - start_y));
start_x = event->x;
start_y = event->y;