summaryrefslogtreecommitdiffstats
path: root/xlib/X11
diff options
context:
space:
mode:
Diffstat (limited to 'xlib/X11')
-rw-r--r--xlib/X11/X.h6
-rw-r--r--xlib/X11/Xlib.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/xlib/X11/X.h b/xlib/X11/X.h
index 55a3133..a7f6566 100644
--- a/xlib/X11/X.h
+++ b/xlib/X11/X.h
@@ -59,7 +59,11 @@ typedef unsigned long VisualID;
typedef unsigned long Time;
-typedef unsigned short KeyCode;
+typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
+ * to pack 3 bytes into the keyCode field in
+ * the XEvent. In the real X.h, a KeyCode is
+ * defined as a short, which wouldn't be big
+ * enough. */
/*****************************************************************
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h
index 397bb03..247255b 100644
--- a/xlib/X11/Xlib.h
+++ b/xlib/X11/Xlib.h
@@ -546,7 +546,7 @@ typedef struct {
Bool same_screen; /* same screen flag */
char trans_chars[XMaxTransChars];
/* translated characters */
- int nchars;
+ int nbytes;
} XKeyEvent;
typedef XKeyEvent XKeyPressedEvent;
typedef XKeyEvent XKeyReleasedEvent;