aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2021-11-19 19:13:14 +0000
committerWolfgang Müller2021-12-03 10:07:50 +0100
commit30c74c96ca3007bc2118f6fd436f7683ba71f94b (patch)
tree57b218db6531f24e161db1f0287f6b34a03c43e1
parentc74f89bbdf57a049fa07b49429b1951b2b05773b (diff)
downloadcwm-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>
-rw-r--r--conf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 9919597..e47a206 100644
--- a/conf.c
+++ b/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>
@@ -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;