diff options
author | abs <abs> | 2003-05-18 21:09:07 +0000 |
---|---|---|
committer | abs <abs> | 2003-05-18 21:09:07 +0000 |
commit | eb5031f6084eb26938863bb71adf2dd5d2aed4b2 (patch) | |
tree | a725410ca6b49a7330b03656d74b477038fdd016 /wm/golem/patches | |
parent | 072324f592cedb2f885751e9ef8c69de22a30801 (diff) | |
download | pkgsrc-eb5031f6084eb26938863bb71adf2dd5d2aed4b2.tar.gz |
Update golem to 0.0.5nb1 - handle invalid keysyms and allow numeric keycodes
with KeyCodeNNN. Patch sent to and accepted by maintainer.
Diffstat (limited to 'wm/golem/patches')
-rw-r--r-- | wm/golem/patches/patch-ab | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/wm/golem/patches/patch-ab b/wm/golem/patches/patch-ab index a22870e08b7..89d7b14b701 100644 --- a/wm/golem/patches/patch-ab +++ b/wm/golem/patches/patch-ab @@ -1,8 +1,31 @@ -$NetBSD: patch-ab,v 1.1.1.1 2003/05/15 11:19:43 salo Exp $ +$NetBSD: patch-ab,v 1.2 2003/05/18 21:09:08 abs Exp $ ---- src/rcfile.y.orig 2002-05-22 01:06:25.000000000 +0200 -+++ src/rcfile.y 2003-05-15 11:46:30.000000000 +0200 -@@ -536,7 +536,7 @@ +--- src/rcfile.y.orig Wed May 22 00:06:25 2002 ++++ src/rcfile.y +@@ -304,12 +304,16 @@ options_stmt : error + + keys_stmt : error + | KEYNAME STRING modmask keyarg { +- if (keys_add(XKeysymToKeycode(display, XStringToKeysym($2)), +- $3, $1, (void *) $4) == NULL) { +- free($2); +- yyerror("couldn't allocate memory for keybind_t"); +- YYERROR; +- } ++ int keycode; ++ keycode = XKeysymToKeycode(display, XStringToKeysym($2)); ++ if (keycode == 0 && strncmp($2, "KeyCode", 7) == 0) ++ keycode = atoi($2 + 7); ++ if (keycode > 0) ++ if (keys_add(keycode, $3, $1, (void *) $4) == NULL) { ++ free($2); ++ yyerror("couldn't allocate memory for keybind_t"); ++ YYERROR; ++ } + free($2); + } + ; +@@ -536,7 +540,7 @@ void rcfile_parse() { */ fp = fopen(rcfn, "r"); if (!fp) { |