src/video/emscripten/SDL_emscriptenevents.c
changeset 10318 7b9ae714c507
parent 10317 4a45690d5d82
child 10319 c16a46e31811
     1.1 --- a/src/video/emscripten/SDL_emscriptenevents.c	Tue Sep 13 00:03:28 2016 -0700
     1.2 +++ b/src/video/emscripten/SDL_emscriptenevents.c	Tue Sep 13 00:03:36 2016 -0700
     1.3 @@ -349,7 +349,8 @@
     1.4  Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
     1.5  {
     1.6      SDL_WindowData *window_data = userData;
     1.7 -    SDL_SendWindowEvent(window_data->window, eventType == EMSCRIPTEN_EVENT_MOUSEENTER ? SDL_WINDOWEVENT_ENTER : SDL_WINDOWEVENT_LEAVE, 0, 0);
     1.8 +
     1.9 +    SDL_SetMouseFocus(eventType == EMSCRIPTEN_EVENT_MOUSEENTER ? window_data->window : NULL);
    1.10      return 1;
    1.11  }
    1.12