# HG changeset patch # User Sam Lantinga # Date 1255159800 0 # Node ID 6cc2b35ac610eedc2eae48847feb5c9a68bae3fc # Parent 485868a1c28305c0dcbb672a110f5e7e72b22d71 Fixed bug #634 If TranslateMessage() isn't done, then IME messages aren't generated. diff -r 485868a1c283 -r 6cc2b35ac610 src/video/windib/SDL_dibevents.c --- a/src/video/windib/SDL_dibevents.c Sat Oct 10 06:38:02 2009 +0000 +++ b/src/video/windib/SDL_dibevents.c Sat Oct 10 07:30:00 2009 +0000 @@ -198,7 +198,7 @@ m.wParam = wParam; m.lParam = lParam; m.time = 0; - if ( TranslateMessage(&m) && PeekMessage(&m, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) { + if ( PeekMessage(&m, hwnd, 0, WM_USER, PM_NOREMOVE) && (m.message == WM_CHAR) ) { GetMessage(&m, hwnd, 0, WM_USER); wParam = m.wParam; } @@ -363,6 +363,7 @@ while ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { + TranslateMessage(&msg); DispatchMessage(&msg); } } diff -r 485868a1c283 -r 6cc2b35ac610 src/video/windx5/SDL_dx5events.c --- a/src/video/windx5/SDL_dx5events.c Sat Oct 10 06:38:02 2009 +0000 +++ b/src/video/windx5/SDL_dx5events.c Sat Oct 10 07:30:00 2009 +0000 @@ -655,6 +655,7 @@ while ( ! posted && PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { + TranslateMessage(&msg); DispatchMessage(&msg); } else { return(-1); @@ -713,12 +714,17 @@ } if ( event != WAIT_TIMEOUT ) { /* Maybe there was a windows message? */ - if ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { + posted = 0; + while ( ! posted && + PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { if ( GetMessage(&msg, NULL, 0, 0) > 0 ) { + TranslateMessage(&msg); DispatchMessage(&msg); } else { return(-1); } + } + if ( posted ) { return(1); } }