summaryrefslogtreecommitdiff
path: root/dock.c
diff options
context:
space:
mode:
Diffstat (limited to 'dock.c')
-rw-r--r--dock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/dock.c b/dock.c
index c7336c6..f759f99 100644
--- a/dock.c
+++ b/dock.c
@@ -532,9 +532,17 @@ kiba_launcher_exec (gpointer data)
KibaLauncher *launcher = data;
char **argv;
GError *error = NULL;
+ const KibaDockLayoutData *d;
/* Bounce the icon. */
- launcher->object->previous_position.y += g_random_double_range (5, 10);
+ d = &kiba_dock_layout_data[launcher->dock->position];
+
+ if (d->orientation == GTK_ORIENTATION_VERTICAL)
+ launcher->object->previous_position.x +=
+ (d->halignment - 1) * g_random_double_range (5, 10);
+ else
+ launcher->object->previous_position.y +=
+ (d->valignment - 1) * g_random_double_range (5, 10);
/* FIXME: Support drag and drop on launchers with %U and %F */
/* FIXME: Use g_shell_quote or split or whatever it was... */