diff options
author | patthoyts <patthoyts@noemail.net> | 2009-05-21 23:01:32 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2009-05-21 23:01:32 (GMT) |
commit | 74a63b26634528162ef822a98811fddff9800d7a (patch) | |
tree | 0fc12ef4b3de3f7adf50d3d7b3d83fb1b977d7f6 /win/tkWinMenu.c | |
parent | 3f5c80bec3a8cf00e1a2682996fca67c7a2d5700 (diff) | |
download | tk-74a63b26634528162ef822a98811fddff9800d7a.zip tk-74a63b26634528162ef822a98811fddff9800d7a.tar.gz tk-74a63b26634528162ef822a98811fddff9800d7a.tar.bz2 |
[Bug 2794778]: backported fix for keyboard transversal of the menus on Windows.
FossilOrigin-Name: db3833169a9aa8345710ef456e32b3b3d5be6b80
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r-- | win/tkWinMenu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 004cd14..84bd49d 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.59.2.1 2009/02/23 10:37:38 patthoyts Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.59.2.2 2009/05/21 23:01:33 patthoyts Exp $ */ #define OEMRESOURCE @@ -1981,14 +1981,15 @@ TkWinMenuKeyObjCmd( virtualKey = XKeysymToKeycode(winPtr->display, keySym); scanCode = MapVirtualKey(virtualKey, 0); if (0 != scanCode) { + XKeyEvent xkey = eventPtr->xkey; CallWindowProc(DefWindowProc, Tk_GetHWND(Tk_WindowId(tkwin)), WM_SYSKEYDOWN, virtualKey, (int) ((scanCode << 16) | (1 << 29))); - if (eventPtr->xkey.nbytes > 0) { - for (i = 0; i < eventPtr->xkey.nbytes; i++) { + if (xkey.nbytes > 0) { + for (i = 0; i < xkey.nbytes; i++) { CallWindowProc(DefWindowProc, Tk_GetHWND(Tk_WindowId(tkwin)), WM_SYSCHAR, - eventPtr->xkey.trans_chars[i], + xkey.trans_chars[i], (int) ((scanCode << 16) | (1 << 29))); } } |