aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-01 18:47:24 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-01 18:47:24 +0200
commitd9d02f2db0b6b7df4fc118cebd913ea7cd2f6e1c (patch)
treea349bc568bae5ba2e07cf0a8fc67c84d022f4778
parent83923c1471d2d75c2872a5498258573ecfa05013 (diff)
downloaddwim-d9d02f2db0b6b7df4fc118cebd913ea7cd2f6e1c.tar.gz
xchord: Run dwim on key release
Otherwise, the X selection won't have time to update!
-rw-r--r--xchord.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xchord.c b/xchord.c
index 3ceef51..7df852f 100644
--- a/xchord.c
+++ b/xchord.c
@@ -78,12 +78,12 @@ main(int argc, char *argv[])
case XI_RawButtonPress:
/* button 1 pressed */
if (rev->detail == 1) p1 = 1;
- /* button 1 + 3 pressed */
- if (p1 && rev->detail == 3) system("dwim");
break;
case XI_RawButtonRelease:
/* button 1 released */
if (rev->detail == 1) p1 = 0;
+ /* button 1 pressed + 3 released */
+ if (p1 && rev->detail == 3) system("dwim");
break;
}