diff options
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index ff453d3..d99f1ec 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinX.c,v 1.57.2.2 2010/03/12 13:02:36 nijtmans Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.57.2.3 2010/05/20 22:43:23 dkf Exp $ */ /* @@ -1627,10 +1627,14 @@ HandleIMEComposition( * We set send_event to the special value of -2, so that TkpGetString * in tkWinKey.c knows that trans_chars[] already contains a UNICODE * char and there's no need to do encoding conversion. + * + * Note that the event *must* be zeroed out first; Tk plays cunning + * games with the overalls structure. [Bug 2992129] */ winPtr = (TkWindow *) Tk_HWNDToWindow(hwnd); + memset(&event, 0, sizeof(XEvent)); event.xkey.serial = winPtr->display->request++; event.xkey.send_event = -2; event.xkey.display = winPtr->display; |