diff options
-rw-r--r-- | xchord.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -16,6 +16,7 @@ * xchord is written by John Ankarström <john (at) ankarstrom.se>. */ +#include <err.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -85,7 +86,10 @@ main(int argc, char *argv[]) /* button 1 released */ if (rev->detail == 1) p1 = 0; /* button 1 pressed + 3 released */ - if (p1 && rev->detail == 3) system("dwim"); + if (p1 && rev->detail == 3 && vfork() == 0) { + execlp("dwim", "dwim", NULL); + err(1, "execlp"); + } break; } |