View Issue Details

IDProjectCategoryView StatusLast Update
0032686Open CASCADEOCCT:Visualizationpublic2022-01-07 07:33
Reporterkgv Assigned Tosmoskvin  
PrioritynormalSeverityminor 
Status verifiedResolutionfixed 
Product Version7.6.0 
Target Version7.7.0 
Summary0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events
DescriptionFirefox sets non-zero MouseEvent.buttons to mouse click event emulated from a tap on touchscreen device.

WebGL sample (since 0032609) selectively attaches emscripten_set_mouseup_callback() and emscripten_set_mousemove_callback() callbacks to entire window (EMSCRIPTEN_EVENT_TARGET_WINDOW) while emscripten_set_mousedown_callback() is handled for canvas.

This combination leads to unexpected results - mouse button is registered by Wasm_Window::ProcessMouseEvent() as pressed and remains in this state indefinitely.

It is proposed to filter out pressed buttons state within mouse up / move events when they are inconsistent to previously received mouse down events.
Steps To Reproduce- Open WebGL sample in Firefox.
- Tap onto middle of the viewer on touchscreen.
- Tap onto OCC Logo (displayed on top of 3D Viewer by dedicated HTML control).
Bug - viewer is suddenly rotated to new position.
TagsNo tags attached.
Test case numberN/A

Relationships

child of 0032433 closedbugmaster Visualization, TKService - introduce Wasm_Window implementing Aspect_Window interface using Emscripten SDK 
child of 0032609 closedsmoskvin Visualization, Wasm_Window - handle mouse movements outside canvas element 

Activities

git

2021-11-24 00:08

administrator   ~0105386

Branch CR32686 has been created by kgv.

SHA-1: 3acf87e3dd26fa6bd637d21745e251a31dfd86d9


Detailed log of new commits:

Author: kgv
Date: Wed Nov 24 00:08:21 2021 +0300

    0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events
    
    Wasm_Window::ProcessMouseEvent() now ignores not previously pressed mouse buttons within mouse move / up events.
    Fixed -Wshorten-64-to-32 compiler warning within cpulimit command on 32-bit Linux.

kgv

2021-11-24 00:10

developer   ~0105387

Patch is ready for review
- OCCT: branch CR32686.

osa

2021-11-25 17:30

developer   ~0105425

The patch was reviewed without remarks

smoskvin

2021-11-27 14:24

administrator   ~0105465

Combination -
OCCT branch : IR-2021-11-26
master SHA - 4a837ecec21bfe24d9c224c4b59aa9779156f297
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2021-11-26 SHA - 5da5872bffc6c1fa745ee5e33ac09c4fffd349b4
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18390.380000000398 / 18549.650000000624 [-0.86%]
Products
Total CPU difference: 11648.280000000103 / 11661.570000000122 [-0.11%]
Windows-64-VC14:
OCCT
Total CPU difference: 19927.859375 / 19945.046875 [-0.09%]
Products
Total CPU difference: 13059.03125 / 13091.625 [-0.25%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2021-11-27 15:05

administrator   ~0105490

Branch CR32686 has been deleted by mnt.

SHA-1: 3acf87e3dd26fa6bd637d21745e251a31dfd86d9

Related Changesets

occt: master b6b55c3d

2021-11-23 21:08:21

kgv


Committer: smoskvin Details Diff
0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events

Wasm_Window::ProcessMouseEvent() now ignores not previously pressed mouse buttons within mouse move / up events.
Fixed -Wshorten-64-to-32 compiler warning within cpulimit command on 32-bit Linux.
Affected Issues
0032686
mod - src/Draw/Draw_BasicCommands.cxx Diff File
mod - src/Wasm/Wasm_Window.cxx Diff File

Issue History

Date Modified Username Field Change
2021-11-23 23:35 kgv New Issue
2021-11-23 23:35 kgv Assigned To => kgv
2021-11-23 23:46 kgv Relationship added child of 0032433
2021-11-23 23:46 kgv Relationship added child of 0032609
2021-11-23 23:47 kgv Test case number => N/A
2021-11-23 23:47 kgv Description Updated
2021-11-24 00:08 git Note Added: 0105386
2021-11-24 00:10 kgv Note Added: 0105387
2021-11-24 00:10 kgv Assigned To kgv => osa
2021-11-24 00:10 kgv Status new => resolved
2021-11-25 17:30 osa Note Added: 0105425
2021-11-25 17:30 osa Assigned To osa => bugmaster
2021-11-25 17:30 osa Status resolved => reviewed
2021-11-27 14:24 smoskvin Note Added: 0105465
2021-11-27 14:24 smoskvin Status reviewed => tested
2021-11-27 14:52 smoskvin Changeset attached => occt master b6b55c3d
2021-11-27 14:52 smoskvin Assigned To bugmaster => smoskvin
2021-11-27 14:52 smoskvin Status tested => verified
2021-11-27 14:52 smoskvin Resolution open => fixed
2021-11-27 15:05 git Note Added: 0105490