summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-11-01 20:57:15 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-11-01 20:57:15 (GMT)
commitff9f71c974f69fc7957ea48b687ed49aa1d2548e (patch)
tree99f60aef70044656a3d18326129839bb63514d53 /macosx
parent7843d440f23b0627f128c63a083f12c77211442f (diff)
parentc8a03246258dcb64fa73c5692e8fcfbcfef60b36 (diff)
downloadtk-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.c6
-rw-r--r--macosx/tkMacOSXKeyboard.c2
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 {