summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-31 15:10:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-31 15:10:42 (GMT)
commit8ed6636074783c408473468aee6f5c2824273ad8 (patch)
treef0812ffd757af775c762aa23a866dd15b808b874
parentb94f5639e0d02222c409549af8dc464260afbfe6 (diff)
downloadtk-bug_62f1343ad2.zip
tk-bug_62f1343ad2.tar.gz
tk-bug_62f1343ad2.tar.bz2
Attempt to fix [62f1343ad2fd9c77d1f3bf4c9e244e6f33787172|62f1343ad2]: Tk textbox not working with "Bengali" set as keyboard input language.bug_62f1343ad2
Patch concept delevered by "budden", simplified a little bit, should have the same effect. (I would prefer to change the only remaining PeekMessageA() to PeekMessage(). But if the msg then doesn't contain sufficient information to decide upon, maybe we have to live with this ...)
-rw-r--r--win/tkWinX.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index fca72c3..8148ec5 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -1377,6 +1377,7 @@ GetTranslatedKey(
UINT type)
{
MSG msg;
+ WPARAM AwParam;
xkey->nbytes = 0;
@@ -1385,8 +1386,8 @@ GetTranslatedKey(
if (msg.message != type) {
break;
}
-
- GetMessageA(&msg, NULL, type, type);
+ AwParam = msg.wParam;
+ GetMessage(&msg, NULL, type, type);
/*
* If this is a normal character message, we may need to strip off the
@@ -1398,10 +1399,8 @@ GetTranslatedKey(
if ((msg.message == WM_CHAR) && (msg.lParam & 0x20000000)) {
xkey->state = 0;
}
- xkey->trans_chars[xkey->nbytes] = (char) msg.wParam;
- xkey->nbytes++;
- if (((unsigned short) msg.wParam) > ((unsigned short) 0xff)) {
+ if ((unsigned short) AwParam > (unsigned short) 0xff) {
/*
* Some "addon" input devices, such as the popular PenPower
* Chinese writing pad, generate 16 bit values in WM_CHAR messages
@@ -1409,8 +1408,11 @@ GetTranslatedKey(
* containing two 8-bit values.
*/
- xkey->trans_chars[xkey->nbytes] = (char) (msg.wParam >> 8);
- xkey->nbytes ++;
+ xkey->trans_chars[xkey->nbytes++] = (char) AwParam;
+ xkey->trans_chars[xkey->nbytes++] = (char) (msg.wParam >> 8);
+ } else if (((unsigned short) msg.wParam) > ((unsigned short) 0xff)) {
+ xkey->keycode = (unsigned short) msg.wParam;
+ xkey->send_event = -3;
}
}
}