summaryrefslogtreecommitdiff
path: root/app/cwm
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2021-11-19 19:13:15 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2021-11-19 19:13:15 +0000
commit4d7fdf7a5ffc9fe49d276f344f4ae10921db82b2 (patch)
tree53a8ca7ac64321d18c0fedcc1de4abf0ec4eb9b4 /app/cwm
parent7baa9286f10b6dcdcc4a2392f1f728dccc6afc93 (diff)
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 'app/cwm')
-rw-r--r--app/cwm/conf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index 1e95bd9e1..6523f3c46 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -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>
@@ -669,6 +669,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;