darcs patch: Changing Int to CInt and building with -D_XSERVER64 (w...

Chris Mears chris at cmears.id.au
Thu Mar 29 04:35:48 EDT 2007

Chris Mears <chris at cmears.id.au> writes:

> thedward at antejentacular.org writes:
>> Wed Mar 28 01:24:53 CDT 2007  thedward at antejentacular.org
>>   * (Graphics.X11) Updates for (better) 64-bit compatibility
>>   Changing Int to CInt and building with -D_XSERVER64 (when
>>   appropriate)
> I am not sure if defining _XSERVER64 is the right fix.  The Xlib headers
> say that:  [blah, blah]

An update: I turned off _XSERVER64 and my windows were properly managed
again.  However, an old bug returned: key modifiers are reported
incorrectly.  I have found the source of this error.

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.

So, now Xmonad appears to behave correctly.

More information about the Libraries mailing list