2008/8/23 Peter Hartlich <sgkkr_AT_hartlich.com>:
>> Well no, I thought about this, and found another solution, see updated
>> grabkeys() for my preferred solution.
> It will initialize modifiers[] in all 7 iterations of the for loop
> though. And grabkeys() still does the work grabbuttons() subtly relies
> on later...
grabbuttons() depends on it yes, though otherwise grabkeys() would
depend on initmodmap() which could be considered similiar subtle ;) My
current favorit is something like:
unsigned int getnumlockmask(void);
which replaces the global numlockmask. Thus, we would do something like:
unsigned int numlockmask = getnumlockmask();
unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
in grabbuttons and grabkeys, then all subtle stuff is gone imho.
What do you think?
Kind regards,
--Anselm
Received on Sat Aug 23 2008 - 17:10:18 UTC
This archive was generated by hypermail 2.2.0 : Sat Aug 23 2008 - 17:12:05 UTC