[xmonad] Fwd: Patch for haskell-x11

Mathias Svensson mathias at diku.dk
Fri Nov 18 22:11:02 CET 2011


I was asked to forward this to the xmonad-list if Spencer didn't answer.

---------- Forwarded message ----------
From: Mathias Svensson <mathias at diku.dk>
Date: Thu, Nov 10, 2011 at 10:55 PM
Subject: Patch for haskell-x11
To: spencerjanssen at gmail.com


I found a bug in the haskell-x11 library, causing all keybindings in
xmonad to fail on big-endian systems.

The problem is that the keycode in XKeyEvent is an "unsigned int" and
not a "KeyCode" (which is an alias for unsigned char). However in
Graphics/X11/Xlib/{Event,Extras}.hsc is is read as though it was a
KeyCode. This causes no problems on x86 as they result in the same
data being saved. However on big-endian this assumption means that the
read keycode is always 0.

I have fixed the problems in Event.hsc and Extras.hsc, that caused
xmonad to not work on big-endian, though I'm pretty sure there is a
lot more similar bugs out there (such as first_keycode in
XMappingEvent being an int).

Mathias 'Idolf Hatler' Svensson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keycode.patch
Type: text/x-patch
Size: 2188 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20111118/3890991c/attachment.bin>

More information about the xmonad mailing list