kdrive/ephyr: fix keysym type confusion once and for all

Take keysyms in as an XID in hostx_load_keymap() and explicitly
convert them to CARD32 for loading into the server.  Fixes Xephyr on
AMD64, wa-hey.
This commit is contained in:
Daniel Stone 2007-02-16 23:02:13 +02:00 committed by Daniel Stone
parent 5507cb885d
commit 68d39d8571
2 changed files with 4 additions and 4 deletions

View File

@ -656,7 +656,7 @@ hostx_paint_debug_rect(int x, int y,
void
hostx_load_keymap(void)
{
KeySym *keymap;
XID *keymap;
int host_width, min_keycode, max_keycode, width;
int i,j;
@ -677,7 +677,7 @@ hostx_load_keymap(void)
*/
width = (host_width > 4) ? 4 : host_width;
ephyrKeySyms.map = (KeySym *)calloc(sizeof(KeySym),
ephyrKeySyms.map = (CARD32 *)calloc(sizeof(CARD32),
(max_keycode - min_keycode + 1) *
width);
if (!ephyrKeySyms.map)
@ -685,7 +685,7 @@ hostx_load_keymap(void)
for (i=0; i<(max_keycode - min_keycode+1); i++)
for (j=0; j<width; j++)
ephyrKeySyms.map[(i*width)+j] = keymap[(i*host_width) + j];
ephyrKeySyms.map[(i*width)+j] = (CARD32) keymap[(i*host_width) + j];
EPHYR_DBG("keymap width, host:%d kdrive:%d", host_width, width);

View File

@ -56,7 +56,7 @@ typedef struct {
int minKeyCode;
int maxKeyCode;
int mapWidth;
KeySym *map;
CARD32 *map;
} EphyrKeySyms;
struct EphyrHostXEvent