[dwm] bug in grabkeys()

From: Peter Hartlich <sgkkr_AT_hartlich.com>
Date: Tue, 19 Aug 2008 15:45:05 +0200

Hi,

Changeset 1320:65c37b4be9cb introduces a bug in grabkeys() that causes
MODKEY presses to be ignored if numlock is enabled on my system.

The problem is that between initializing modifiers[] with numlockmask
and using it later, numlockmask is changed without updating modifiers[].

Maybe extract a function initmodmap(), to be called before grabkeys(),
from the modmap initializiation block? Right now grabbuttons(), which
uses numlockmask as well, subtly depends on grabkeys() having been
called beforehand; this might make it a little more explicit what's
going on.

I've attached a patch that works for me, hopefully someone who knows
more about that stuff can look over it.

Regards,
Peter

Received on Tue Aug 19 2008 - 13:45:05 UTC

This archive was generated by hypermail 2.2.0 : Tue Aug 19 2008 - 14:00:05 UTC