From 4ece036d395d93098cea11df0327ca6c117d5713 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 20 May 2010 22:43:23 +0000 Subject: * 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. --- ChangeLog | 14 ++++++++++---- win/tkWinX.c | 6 +++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47ed836..3a17b93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,18 @@ +2010-05-20 Donal K. Fellows + + * 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. + 2010-05-19 Jan Nijtmans - * win/tkWinDialog.c: Fix [Bug #3002230]: tk_chooseDirectory returns - garbage on cancel + * win/tkWinDialog.c: [Bug 3002230]: tk_chooseDirectory returns garbage + on cancel. 2010-05-17 Jan Nijtmans - * win/tkWinDialog.c [Bug #2987995]: Tk_getOpenFile returns garbage under - described circumstances. Backported some formatting from trunk. + * win/tkWinDialog.c: [Bug 2987995]: Tk_getOpenFile returns garbage + under described circumstances. Backported some formatting from trunk. 2010-05-03 Donal K. Fellows 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; -- cgit v0.12