mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-17 14:47:19 +01:00
Listen for blur and focus events on window instead of canvas
Blur and focus events were not arriving for the canvas in Firefox 35 and Chrome 40.
This commit is contained in:
parent
3e5c4cec94
commit
a0a75f384f
@ -586,8 +586,8 @@ Emscripten_RegisterEventHandlers(SDL_WindowData *data)
|
||||
|
||||
emscripten_set_wheel_callback("#canvas", data, 0, Emscripten_HandleWheel);
|
||||
|
||||
emscripten_set_focus_callback("#canvas", data, 0, Emscripten_HandleFocus);
|
||||
emscripten_set_blur_callback("#canvas", data, 0, Emscripten_HandleFocus);
|
||||
emscripten_set_focus_callback("#window", data, 0, Emscripten_HandleFocus);
|
||||
emscripten_set_blur_callback("#window", data, 0, Emscripten_HandleFocus);
|
||||
|
||||
emscripten_set_touchstart_callback("#canvas", data, 0, Emscripten_HandleTouch);
|
||||
emscripten_set_touchend_callback("#canvas", data, 0, Emscripten_HandleTouch);
|
||||
@ -623,8 +623,8 @@ Emscripten_UnregisterEventHandlers(SDL_WindowData *data)
|
||||
|
||||
emscripten_set_wheel_callback("#canvas", NULL, 0, NULL);
|
||||
|
||||
emscripten_set_focus_callback("#canvas", NULL, 0, NULL);
|
||||
emscripten_set_blur_callback("#canvas", NULL, 0, NULL);
|
||||
emscripten_set_focus_callback("#window", NULL, 0, NULL);
|
||||
emscripten_set_blur_callback("#window", NULL, 0, NULL);
|
||||
|
||||
emscripten_set_touchstart_callback("#canvas", NULL, 0, NULL);
|
||||
emscripten_set_touchend_callback("#canvas", NULL, 0, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user