summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-05-20 22:43:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-05-20 22:43:23 (GMT)
commit4ece036d395d93098cea11df0327ca6c117d5713 (patch)
tree1072fd267a3e2b4d637c70bd18ced3e60e459b4f /win/tkWinX.c
parent6f6de19f4f66f9f446af059151dafc02c3ada12b (diff)
downloadtk-4ece036d395d93098cea11df0327ca6c117d5713.zip
tk-4ece036d395d93098cea11df0327ca6c117d5713.tar.gz
tk-4ece036d395d93098cea11df0327ca6c117d5713.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.c6
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;