aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2020-10-04 15:34:53 +0200
committerOmar Polo <op@omarpolo.com>2020-10-04 15:34:53 +0200
commitc7063e0ecdd508cad67bdb8d072630315fbac265 (patch)
treecbd5f1b61a80722699c35680ec743c03c473a73b
parent2eb11d8ec14963a978a1811f5d0beca158d64f50 (diff)
downloadstar-platinum-c7063e0ecdd508cad67bdb8d072630315fbac265.tar.gz
star-platinum-c7063e0ecdd508cad67bdb8d072630315fbac265.tar.bz2
exec only on key press
it seems to me the most sensible approach
-rw-r--r--star-platinum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/star-platinum.c b/star-platinum.c
index 3db2088..9e75a59 100644
--- a/star-platinum.c
+++ b/star-platinum.c
@@ -353,6 +353,10 @@ do_action(struct action a, Window focused, XKeyEvent *original)
pid_t p;
const char *sh;
+ /* exec only on key press */
+ if (original->type == KeyRelease)
+ break;
+
switch (p = fork()) {
case -1:
err(1, "fork");