Get rid of the synchronous system call by piping the command to stdout as suggested in #46
This commit is contained in:
parent
23c531078c
commit
0eb09810dc
4
bar.c
4
bar.c
|
@ -1037,8 +1037,8 @@ main (int argc, char **argv)
|
||||||
press_ev = (xcb_button_press_event_t *)ev;
|
press_ev = (xcb_button_press_event_t *)ev;
|
||||||
/* Respond to left click */
|
/* Respond to left click */
|
||||||
if (press_ev->detail == XCB_BUTTON_INDEX_1) {
|
if (press_ev->detail == XCB_BUTTON_INDEX_1) {
|
||||||
area_t *a = area_get(press_ev->event, press_ev->event_x);
|
area_t *area = area_get(press_ev->event, press_ev->event_x);
|
||||||
if (a) system(a->cmd);
|
if (area) { write(STDOUT_FILENO, area->cmd, strlen(area->cmd)); write(STDOUT_FILENO, "\n", 1); }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user