diff options
Diffstat (limited to 'dock.c')
-rw-r--r-- | dock.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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... */ |