summaryrefslogtreecommitdiff
path: root/tz-launcher/tz-launcher-wl.c
diff options
context:
space:
mode:
Diffstat (limited to 'tz-launcher/tz-launcher-wl.c')
-rw-r--r--tz-launcher/tz-launcher-wl.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/tz-launcher/tz-launcher-wl.c b/tz-launcher/tz-launcher-wl.c
index 1213717..9e3dd74 100644
--- a/tz-launcher/tz-launcher-wl.c
+++ b/tz-launcher/tz-launcher-wl.c
@@ -183,9 +183,11 @@ launcher_button_handler(struct widget *widget,
widget_schedule_redraw (widget);
if (state == WL_POINTER_BUTTON_STATE_RELEASED) {
- gchar *command = g_strconcat (launcher->exec, " &", NULL);
- system (command);
- g_free (command);
+ if (fork () == 0) {
+ gchar **command = g_strsplit (launcher->exec, " ", 0);
+ execvp (command[0], command);
+ g_strfreev (command);
+ }
}
}
@@ -199,9 +201,11 @@ launcher_touch_up_handler(struct widget *widget, struct input *input,
launcher->focused = 0;
widget_schedule_redraw(widget);
- gchar *command = g_strconcat (launcher->exec, " &", NULL);
- system (command);
- g_free (command);
+ if (fork () == 0) {
+ gchar **command = g_strsplit (launcher->exec, " ", 0);
+ execvp (command[0], command);
+ g_strfreev (command);
+ }
}
static void