[wiki] [sites] update diff file for dwm chainkey patch || braunbearded

From: <git_AT_suckless.org>
Date: Wed, 29 Jul 2020 21:51:19 +0200

commit ed1a260c20b6ef7d5a45c2b4ae5e2c37a5088bcf
Author: braunbearded <braunbearded1_AT_gmail.com>
Date: Wed Jul 29 21:51:17 2020 +0200

    update diff file for dwm chainkey patch

diff --git a/dwm.suckless.org/patches/keychain/dwm-keychain-20200719-e9f3eec.diff b/dwm.suckless.org/patches/keychain/dwm-keychain-20200729-053e3a2.diff
similarity index 88%
rename from dwm.suckless.org/patches/keychain/dwm-keychain-20200719-e9f3eec.diff
rename to dwm.suckless.org/patches/keychain/dwm-keychain-20200729-053e3a2.diff
index 140f26f6..cf3ad28f 100644
--- a/dwm.suckless.org/patches/keychain/dwm-keychain-20200719-e9f3eec.diff
+++ b/dwm.suckless.org/patches/keychain/dwm-keychain-20200729-053e3a2.diff
_AT_@ -1,7 +1,7 @@
 From e6c2d5fdc6010a22d6cd74485cb0b3e74467d0da Mon Sep 17 00:00:00 2001
 From: braunbearded <braunbearded1_AT_gmail.com>
 Date: Wed, 29 Jul 2020 18:37:47 +0200
-Subject: [PATCH 1/3] chain key bindings
+Subject: [PATCH 1/4] chain key bindings
 
 ---
  dwm.c | 34 +++++++++++++++++++++++++++++-----
_AT_@ -90,7 +90,7 @@ index 9fd0286..7298c5e 100644
 From ad3d15cf7df3286d35728afef823c3163898e2db Mon Sep 17 00:00:00 2001
 From: braunbearded <braunbearded1_AT_gmail.com>
 Date: Wed, 29 Jul 2020 18:38:15 +0200
-Subject: [PATCH 2/3] update default bindings
+Subject: [PATCH 2/4] update default bindings
 
 ---
  config.def.h | 80 +++++++++++++++++++++++++++-------------------------
_AT_@ -201,7 +201,7 @@ index 1c0b587..c7cab16 100644
 From e9f3eec82010fd6083dc57f058902a1aab2d14ea Mon Sep 17 00:00:00 2001
 From: braunbearded <braunbearded1_AT_gmail.com>
 Date: Wed, 29 Jul 2020 19:07:07 +0200
-Subject: [PATCH 3/3] fix bug for mod key ignore
+Subject: [PATCH 3/4] fix bug for mod key ignore
 
 ---
  dwm.c | 1 +
_AT_@ -222,3 +222,45 @@ index 7298c5e..aee56d4 100644
 --
 2.28.0
 
+
+From 053e3a2b2ff87805a15f3fe2f82a7d8bf0ab9b7a Mon Sep 17 00:00:00 2001
+From: braunbearded <braunbearded1_AT_gmail.com>
+Date: Wed, 29 Jul 2020 21:25:23 +0200
+Subject: [PATCH 4/4] listen for all keys inkl modifier after prefix
+
+---
+ dwm.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index aee56d4..dea8f6a 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -993,10 +993,11 @@ isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info)
+ void
+ keypress(XEvent *e)
+ {
+- unsigned int i;
++ unsigned int i, j;
+ KeySym keysym;
+ XKeyEvent *ev;
+ int current = 0;
++ unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
+
+ ev = &e->xkey;
+ keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
+_AT_@ -1010,8 +1011,9 @@ keypress(XEvent *e)
+ && keys[i].func) {
+ current = 1;
+ keychain = keysym;
+- XGrabKey(dpy, AnyKey, AnyModifier, root, True, GrabModeAsync,
+- GrabModeAsync);
++ for (j = 0; j < LENGTH(modifiers); j++)
++ XGrabKey(dpy, AnyKey, 0 | modifiers[j], root,
++ True, GrabModeAsync, GrabModeAsync);
+ } else if (!current && keysym == keys[i].keysym
+ && keychain != -1
+ && keys[i].chain == keychain
+--
+2.28.0
+
diff --git a/dwm.suckless.org/patches/keychain/index.md b/dwm.suckless.org/patches/keychain/index.md
index 34fa69f8..7c4edcd7 100644
--- a/dwm.suckless.org/patches/keychain/index.md
+++ b/dwm.suckless.org/patches/keychain/index.md
_AT_@ -12,7 +12,7 @@ together which all starts with the specified Mod + ChainKey prefix.
 
 Download
 --------
-* [dwm-keychain-20200719-e9f3eec.diff](dwm-keychain-20200719-e9f3eec.diff)
+* [dwm-keychain-20200729-053e3a2.diff](dwm-keychain-20200729-053e3a2.diff)
 
 Author
 ------
Received on Wed Jul 29 2020 - 21:51:19 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 29 2020 - 22:00:47 CEST