* Added TranslateMessage call to SDL default message pump - was causing problems in S2 tools mode apps that used Qt. Qt relies on the WM_CHAR message generated by TranslateMessage and keyboard input was showing up in the UI as mixed-case. (Depending on which message pump got a given message - both SDL and Qt pump messages for the entire process.) Sam will review and possibly tweak this change before propagating to public SDL, but I'm checking this version in so I can integrate into S2 and fix the issue there.
authorSam Lantinga <slouken@libsdl.org>
Thu, 30 Jan 2014 12:27:00 -0800
changeset 8142061ee02876e3
parent 8141 f3c8d96605cb
child 8143 ce90b743882a
* Added TranslateMessage call to SDL default message pump - was causing problems in S2 tools mode apps that used Qt. Qt relies on the WM_CHAR message generated by TranslateMessage and keyboard input was showing up in the UI as mixed-case. (Depending on which message pump got a given message - both SDL and Qt pump messages for the entire process.) Sam will review and possibly tweak this change before propagating to public SDL, but I'm checking this version in so I can integrate into S2 and fix the issue there.
src/video/windows/SDL_windowsevents.c
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Wed Jan 29 18:37:23 2014 -0800
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Thu Jan 30 12:27:00 2014 -0800
     1.3 @@ -550,24 +550,6 @@
     1.4          returnCode = 0;
     1.5          break;
     1.6  
     1.7 -    case WM_UNICHAR:
     1.8 -        {
     1.9 -            if (wParam == UNICODE_NOCHAR) {
    1.10 -                returnCode = 1;
    1.11 -                break;
    1.12 -            }
    1.13 -        }
    1.14 -        /* no break */
    1.15 -    case WM_CHAR:
    1.16 -        {
    1.17 -            char text[5];
    1.18 -
    1.19 -            WIN_ConvertUTF32toUTF8(wParam, text);
    1.20 -            SDL_SendKeyboardText(text);
    1.21 -        }
    1.22 -        returnCode = 0;
    1.23 -        break;
    1.24 -
    1.25  #ifdef WM_INPUTLANGCHANGE
    1.26      case WM_INPUTLANGCHANGE:
    1.27          {
    1.28 @@ -866,6 +848,7 @@
    1.29      const Uint8 *keystate;
    1.30      MSG msg;
    1.31      while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
    1.32 +		TranslateMessage(&msg);
    1.33          DispatchMessage(&msg);
    1.34      }
    1.35