diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-05-20 22:48:13 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-05-20 22:48:13 (GMT) |
commit | 16e2616552f5fc57dd669f4875e476fd9656e498 (patch) | |
tree | d5d357b97a22837ce02e07af82b8558ef2b06bbc /win/tkWinX.c | |
parent | 154d66ee2ba284c660ae8f0430757d18d0c77a02 (diff) | |
download | tk-16e2616552f5fc57dd669f4875e476fd9656e498.zip tk-16e2616552f5fc57dd669f4875e476fd9656e498.tar.gz tk-16e2616552f5fc57dd669f4875e476fd9656e498.tar.bz2 |
* win/tkWinX.c (HandleIMEComposition): [Bug 2992129]: Ensure that all
places that generate key events zero them out first; Tk relies on that
being true for the generic parts of the fix for Bug 1924761.
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 a0f69ab..75752fe 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.64 2010/04/29 15:28:04 nijtmans Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.65 2010/05/20 22:48:13 dkf Exp $ */ /* @@ -1632,10 +1632,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; |