diff options
author | fvogel <fvogelnew1@free.fr> | 2019-11-01 20:57:15 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-11-01 20:57:15 (GMT) |
commit | ff9f71c974f69fc7957ea48b687ed49aa1d2548e (patch) | |
tree | 99f60aef70044656a3d18326129839bb63514d53 /macosx | |
parent | 7843d440f23b0627f128c63a083f12c77211442f (diff) | |
parent | c8a03246258dcb64fa73c5692e8fcfbcfef60b36 (diff) | |
download | tk-ff9f71c974f69fc7957ea48b687ed49aa1d2548e.zip tk-ff9f71c974f69fc7957ea48b687ed49aa1d2548e.tar.gz tk-ff9f71c974f69fc7957ea48b687ed49aa1d2548e.tar.bz2 |
merge core-8-6-branch, in particular, push a different fix for the 'Column ... out of range' error reported in [caacf1f082], this time without any regression...
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyboard.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index fd9e122..b3c1041 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -603,17 +603,15 @@ setupXEvent(XEvent *xEvent, NSWindow *w, unsigned int state) memset(xEvent, 0, sizeof(XEvent)); xEvent->xany.serial = LastKnownRequestProcessed(Tk_Display(tkwin)); - xEvent->xany.send_event = false; xEvent->xany.display = Tk_Display(tkwin); xEvent->xany.window = Tk_WindowId(tkwin); xEvent->xkey.root = XRootWindow(Tk_Display(tkwin), 0); - xEvent->xkey.subwindow = None; xEvent->xkey.time = TkpGetMS(); xEvent->xkey.state = state; xEvent->xkey.same_screen = true; - xEvent->xkey.trans_chars[0] = 0; - xEvent->xkey.nbytes = 0; + /* No need to initialize other fields implicitly here, + * because of the memset() above. */ } #pragma mark - diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index 1b44b21..e91dfe2 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -720,7 +720,7 @@ TkpSetKeycodeAndState( } if (keysym <= LATIN1_MAX) { - int done = Tcl_UniCharToUtf(keysym, eventPtr->xkey.trans_chars); + int done = TkUniCharToUtf(keysym, eventPtr->xkey.trans_chars); eventPtr->xkey.trans_chars[done] = 0; } else { |