aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/imTrans.c
diff options
context:
space:
mode:
authorISHIKAWA,chiaki <ishikawa@yk.rim.or.jp>2012-12-18 15:28:05 +0000
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:28 +0200
commitce482d4fd8fe565810391b0ac89e4b1ac8fd7212 (patch)
treed711b884f459b9a4aa0461e27fa988b7c29c707f /nx-X11/lib/X11/imTrans.c
parented53aca1d68a5d7511b1304f11a43ba80885fbe2 (diff)
downloadnx-libs-ce482d4fd8fe565810391b0ac89e4b1ac8fd7212.tar.gz
nx-libs-ce482d4fd8fe565810391b0ac89e4b1ac8fd7212.tar.bz2
nx-libs-ce482d4fd8fe565810391b0ac89e4b1ac8fd7212.zip
Fix bogus timestamp generated by XIM
Fix bogus timestamp generted by XIM due to uninitialized data field. Also set appropriate serial, too. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39367 Signed-off-by: Chiaki ISHIKAWA <ishikawa@yk.rim.or.jp> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/imTrans.c')
-rw-r--r--nx-X11/lib/X11/imTrans.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/imTrans.c b/nx-X11/lib/X11/imTrans.c
index f06759f88..3cea659f9 100644
--- a/nx-X11/lib/X11/imTrans.c
+++ b/nx-X11/lib/X11/imTrans.c
@@ -222,12 +222,20 @@ _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;
+ 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;