0032638: Draw Harness, ViewerTest - HTML input range misbehavior in WebAssembly
authorkgv <kgv@opencascade.com>
Fri, 22 Oct 2021 12:59:19 +0000 (15:59 +0300)
committersmoskvin <smoskvin@opencascade.com>
Fri, 22 Oct 2021 16:58:16 +0000 (19:58 +0300)
commit5f69cfa70c65f1120e963b54a216b8625268ba22
tree15e3671a3ce69d2fddaa1aeec14cdae54671ac25
parent19da974edcd715cf6ff0a11526f431f3ad890861
0032638: Draw Harness, ViewerTest - HTML input range misbehavior in WebAssembly

ViewerTest_EventManager - added tracking of EMSCRIPTEN_EVENT_FOCUSOUT event.
onWasmMouseCallback() has been adjusted to return FALSE for EMSCRIPTEN_EVENT_TARGET_WINDOW
target to avoid misbehavior of other HTML controls.

WNT_Window::ProcessMessage() now handles WM_SETFOCUS/WM_KILLFOCUS instead of WM_ACTIVATE to track focus changes.

AIS_ViewController::ProcessFocus() now redirects to AIS_ViewController::ResetViewInput() on focus loss.
This fixes issues when key action (like WASD navigation) keep working even after releasing key if window has been switched.
samples/webgl/WasmOcctView.cpp
samples/webgl/WasmOcctView.h
samples/webgl/occt-webgl-sample.html
src/AIS/AIS_ViewController.hxx
src/ViewerTest/ViewerTest_EventManager.cxx
src/WNT/WNT_Window.cxx
src/Wasm/Wasm_Window.cxx
src/Wasm/Wasm_Window.hxx