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

the Edward Blevins thedward at antejentacular.org
Thu Mar 29 17:38:13 EDT 2007

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  <thedward at antejentacular.org>  (512) 796-6661
Today is Pungenday, the 15th day of Discord in the YOLD 3173

More information about the Libraries mailing list