diff options
author | okan | 2021-11-19 19:13:14 +0000 |
---|---|---|
committer | Wolfgang Müller | 2021-12-03 10:07:50 +0100 |
commit | 30c74c96ca3007bc2118f6fd436f7683ba71f94b (patch) | |
tree | 57b218db6531f24e161db1f0287f6b34a03c43e1 /conf.c | |
parent | c74f89bbdf57a049fa07b49429b1951b2b05773b (diff) | |
download | cwm-30c74c96ca3007bc2118f6fd436f7683ba71f94b.tar.gz |
Do not attempt to grab keys without a keycode; this incidentally allows XF86 keys support.
found and fix by Luis Henriques <henrix@camandro.org>
Diffstat (limited to '')
-rw-r--r-- | conf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.252 2020/04/16 13:32:35 okan Exp $ + * $OpenBSD: conf.c,v 1.253 2021/11/19 19:13:14 okan Exp $ */ #include <sys/types.h> @@ -682,6 +682,8 @@ conf_grab_kbd(Window win) TAILQ_FOREACH(kb, &Conf.keybindq, entry) { kc = XKeysymToKeycode(X_Dpy, kb->press.keysym); + if (kc == 0) + continue; if ((XkbKeycodeToKeysym(X_Dpy, kc, 0, 0) != kb->press.keysym) && (XkbKeycodeToKeysym(X_Dpy, kc, 0, 1) == kb->press.keysym)) kb->modmask |= ShiftMask; |