summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sbmanager.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/sbmanager.c b/src/sbmanager.c
index c3bbb95..4b8a5c7 100644
--- a/src/sbmanager.c
+++ b/src/sbmanager.c
@@ -81,6 +81,8 @@ SBItem *selected_item = NULL;
gfloat start_x = 0.0;
gfloat start_y = 0.0;
+gboolean move_left = TRUE;
+
GList *dockitems = NULL;
GList *sbpages = NULL;
@@ -656,9 +658,16 @@ static GList *insert_into_icon_list(GList *iconlist, SBItem *newitem, gfloat ite
/* this is not the row we are in */
continue;
}
- if (item_x < xpos + 30) {
- newpos = i;
- break;
+ if (move_left) {
+ if (item_x < xpos + 40) {
+ newpos = i;
+ break;
+ }
+ } else {
+ if (item_x < xpos - 10) {
+ newpos = i;
+ break;
+ }
}
}
@@ -676,6 +685,12 @@ static gboolean stage_motion(ClutterActor *actor, ClutterMotionEvent *event, gpo
clutter_actor_move_by(icon, (event->x - start_x), (event->y - start_y));
+ if (event->x-start_x > 0) {
+ move_left = FALSE;
+ } else {
+ move_left = TRUE;
+ }
+
start_x = event->x;
start_y = event->y;