Re: [hackers] [dwm] applied Andreas Amann's patch from Oct 2010, thanks || garbeam

From: Benjamin R. Haskell <suckless_AT_benizi.com>
Date: Mon, 27 Jun 2011 14:04:56 -0400 (EDT)

On Mon, 27 Jun 2011, Connor Lane Smith wrote:

> Hey Benjamin,
>
> Does this patch from Mikhail Gonchar fix the issue?
> [...]
> -#define CLEANMASK(mask) (mask & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
> +#define CLEANMASK(mask) (mask & ~numlockmask & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))

This works fine in the short test program I wrote (produces the same
output as the original). But, the original had a form similar to:

WORK(day) (day is not (Sunday or a holiday))

Mikhail Gonchar's patched version is more like:

WORK(day) (day is not a holiday and day is (Saturday or Monday or Tuesday or Wednesday or Thursday or Friday))

In the analogy: Num_Lock = holiday, Caps_Lock = Sunday

So the original still seems much more elegant to me. But that's because
I don't see what problem this prevents/fixed. Are there modifiers in
X11 beyond the ones this patched version explicitly uses (shift,
control, mod1-mod5), and the one it excludes (lock)? IIRC, it's stored
in a byte, and 2 + 5 + 1 = 8, so I don't see how there could be more.

-- 
Best,
Ben
Received on Mon Jun 27 2011 - 20:04:56 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 27 2011 - 20:12:05 CEST