Removed fprintf(stderr, ...) : put them inside #if 0, #endif pair. diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c index cf75919..15d4950 100644 --- a/modules/im/ximcp/imDefLkup.c +++ b/modules/im/ximcp/imDefLkup.c @@ -269,6 +269,8 @@ _XimForwardEventCore( int ret_code; INT16 len; + bzero(buf32, sizeof(buf32)); /* valgrind noticed uninitialized memory use! */ + if (!(len = _XimSetEventToWire(ev, (xEvent *)&buf_s[4]))) return False; /* X event */ @@ -706,6 +723,8 @@ _XimCommitRecv( MARK_FABRICATED(im); + bzero(&ev, sizeof(ev)); /* running kterm under valgrind */ + ev.type = KeyPress; ev.send_event = False; ev.display = im->core.display; @@ -713,6 +732,16 @@ _XimCommitRecv( ev.keycode = 0; ev.state = 0; + ev.time = 0L; + ev.serial = LastKnownRequestProcessed(im->core.display); + /* FIXME : + I wish there were COMMENTs (!) about the data passed around. + */ +#if 0 + fprintf(stderr,"%s,%d: putback k press FIXED ev.time=0 ev.serial=%lu\n", __FILE__, __LINE__, ev.serial); */ +#endif + + XPutBackEvent(im->core.display, (XEvent *)&ev); return True; diff --git a/modules/im/ximcp/imTrans.c b/modules/im/ximcp/imTrans.c index 0ac08aa..002bbc4 100644 --- a/modules/im/ximcp/imTrans.c +++ b/modules/im/ximcp/imTrans.c @@ -222,12 +222,21 @@ _XimTransInternalConnection( if (spec->is_putback) return; + + bzero(&ev, sizeof(ev)); /* FIXME: other fields may be accessed, too. */ kev = (XKeyEvent *)&ev; kev->type = KeyPress; kev->send_event = False; kev->display = im->core.display; kev->window = spec->window; kev->keycode = 0; + /* FIXME */ + kev->time = 0L; + kev->serial = LastKnownRequestProcessed(im->core.display); +#if 0 + fprintf(stderr,"%s,%d: putback FIXED kev->time=0 kev->serial=%lu\n", __FILE__, __LINE__, kev->serial); +#endif + XPutBackEvent(im->core.display, &ev); XFlush(im->core.display); spec->is_putback = True;