diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-29 12:03:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-29 12:03:43 (GMT) |
commit | 4c158f250ca869188d30dcf7628676f0b0de236f (patch) | |
tree | a7130678e7d225c7e0c128f344c6f24f961b670d /win/tkWinX.c | |
parent | 9fd7a0895dc0c93d3796ad72eccdc631d21f54ac (diff) | |
parent | af17312e4d83e5ea367efbed4baf6fa32a067aa4 (diff) | |
download | tk-4c158f250ca869188d30dcf7628676f0b0de236f.zip tk-4c158f250ca869188d30dcf7628676f0b0de236f.tar.gz tk-4c158f250ca869188d30dcf7628676f0b0de236f.tar.bz2 |
Fix [6c0d7aec6713ab6a7c3e12dff7f26bff4679bc9d|6c0d7aec67]: unicode text input Windows 8. Added some test-cases using the "font actual" command.
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index 5771a29..b2424ce 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -1526,7 +1526,7 @@ TkWinGetUnicodeEncoding(void) * * HandleIMEComposition -- * - * This function works around a definciency in some versions of Windows + * This function works around a deficiency in some versions of Windows * 2000 to make it possible to entry multi-lingual characters under all * versions of Windows 2000. * @@ -1556,6 +1556,7 @@ HandleIMEComposition( { HIMC hIMC; int n; + int high = 0; if ((lParam & GCS_RESULTSTR) == 0) { /* @@ -1612,6 +1613,14 @@ HandleIMEComposition( event.xkey.keycode = buff[i++]; + if ((event.xkey.keycode & 0xfc00) == 0xd800) { + high = ((event.xkey.keycode & 0x3ff) << 10) + 0x10000; + break; + } else if (high && (event.xkey.keycode & 0xfc00) == 0xdc00) { + event.xkey.keycode &= 0x3ff; + event.xkey.keycode += high; + high = 0; + } event.type = KeyPress; Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); |