Am Mittwoch, den 30.03.2011, 23:01 +0200 schrieb Luca Bruno:
Let's say Keysym was an enum (it's not the case because there's a really huge number of keysyms starting with XK_). In this scenario string_to_keysym should have been an instance method of this Keysym enum. Therefore it's a method that _only_ belongs to keysyms and has nothing to do with Display, while the keycode is tied to the Display.
I am almost finished with adding all XFooToBar() functions, but I think I found another bug: The current x11 bindings say: KeySym == uint KeyCode == int However, the header files say something else: $ grep -r typedef /usr/include/X11/ | grep 'KeySym;' /usr/include/X11/X.h:typedef XID KeySym; $ grep -r typedef /usr/include/X11/ | grep 'XID;' /usr/include/X11/Xdefs.h:typedef unsigned long XID; /usr/include/X11/Xdefs.h:typedef CARD32 XID; /usr/include/X11/X.h:typedef unsigned long XID; /usr/include/X11/X.h:typedef CARD32 XID; $ grep -r typedef /usr/include/X11/ | grep 'KeyCode;' /usr/include/X11/X.h:typedef unsigned char KeyCode; $ According to the header files this would be correct: KeySym == ulong KeyCode == uchar If I use the old definitions, I get segfaults when using XConvertCase(). With the new definitions everything works fine. Can you confirm that the new definitions are correct before I submit my final patch? Best regards Alexander Kurtz
Attachment:
signature.asc
Description: This is a digitally signed message part