
On Thu, Mar 29, 2007 at 06:35:48PM +1000, Chris Mears wrote:
The problem is that, in the KeyEvent data type, the "state" member has type "Mask" (64 bits). But in the C Xlib headers, the "state" member of the struct in unsigned int (32 bits)! This mucks everything up, in particular, the peek offsets.
The fix is to use CUInt instead of Modifier or Mask for that value. I have hacked up a patch, but I will need to clean it up before posting it here. It requires changes to X11 and X11-extras.
Changing Modifier to be a CUInt works as well, and should require fewer
code changes. It also passes a cursory sanity check of where else Modifier
is used. That is, I checked what else used Modifier, and what the
appropriate type was on the C side. In all the cases I checked it was
unsigned integer.
This would also have the advantage of not requiring any changes to
X11-Extras and only a one line change to xmonad.
What do you think?
--
the Edward Blevins