Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)

Namely, GLFW JS emulation seems to quantize values to a min of -1/+1 which breaks modern OSX/Windows emulating smoothness with stepping wheels (slow steps are sending sub-1.0 values)
+ Massage changelog.
This commit is contained in:
ocornut
2023-02-03 15:00:41 +01:00
parent 6584de4a78
commit d0b1aaa076
2 changed files with 46 additions and 19 deletions

View File

@ -35,36 +35,26 @@ HOW TO UPDATE?
VERSION 1.89.3 (In Progress)
-----------------------------------------------------------------------
Breaking changes:
All changes:
- Inputs, Scrolling: Made horizontal scroll wheel and horizontal scroll direction consistent
accross backends/os. (#4019, #6096, #1463) [@PathogenDavid, @ocornut, @rokups]
- Clarified that 'wheel_y > 0.0f' scrolls Up, 'wheel_y > 0.0f' scrolls Down.
- Clarified that 'wheel_x > 0.0f' scrolls Left, 'wheel_x > 0.0f' scrolls Right.
- Backends: Win32: flipping WM_MOUSEHWHEEL value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
Clarified that 'wheel_x > 0.0f' scrolls Left, 'wheel_x > 0.0f' scrolls Right.
- Backends: Fixed horizontal scroll direction for Win32 and SDL backends. (#4019)
- Shift+WheelY support on non-OSX machines was already correct. (#2424, #1463)
(whereaas on OSX machines Shift+WheelY turns into WheelX at the OS level).
- If you use a custom-backend, you should verify that:
- Wheel up (*) emit wheel_y > 0.0f values and scrolls up.
- Wheel down (*) emit wheel_y < 0.0f values and scrolls down.
- Wheel left (*) or mod+wheel up emit wheel_x > 0.0f values and scroll Left.
- Wheel right (*) or mod+wheel down emits wheel_x < 0.0f values and scroll Right.
- (*) both axises flipped on OSX for mouse and touchpad when 'Natural Scrolling' is on.
- (*) both axises flipped On Windows for touchpad only when 'Settings->Touchpad->Down motion scrolls up' is set.
- If you use a custom-backend, you should verify horizontal wheel direction.
- Axises are flipped by OSX for mouse & touchpad when 'Natural Scrolling' is on.
- Axises are flipped by Windows for touchpad when 'Settings->Touchpad->Down motion scrolls up' is on.
- You can use 'Demo->Tools->Debug Log->IO" to visualize values submitted to Dear ImGui.
- Known issues remaining with Emscripten:
- The magnitude of wheeling values on Emscripten setups is still not great. (#6096)
- The magnitude of wheeling values on Emscripten was improved but isn't perfect. (#6096)
- When running the Emscripten app on a Mac with a mouse, SHIFT+WheelY doesn't turn into WheelX.
This is because we don't know that we are running on Mac and apply our own Shift+swapping
on top of OSX' own swapping, so wheel axises are swapped twice. Emscripten apps may need
to find a way to detect this and set io.ConfigMacOSXBehaviors manually (if you know a way
let us know!), or offer the "OSX-style behavior" option to their user.
All changes:
- Window: Avoid rendering shapes for hidden resize grips.
- Tables: Raised max Columns count from 64 to 512. (#6094, #5305, #4876, #3572)
The previous limit was due to using 64-bit integers but we moved to bits-array
@ -89,11 +79,17 @@ All changes:
can exacerbate that. (#6114, #3644)
- Backends: OSX: Fixed scroll/wheel scaling for devices emitting events with
hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
- Backends: Win32: flipping WM_MOUSEHWHEEL value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
- Backends: SDL: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data
for smooth scrolling as reported by SDL. (#4019, #6096)
- Backends: SDL: Avoid calling SDL_SetCursor() when cursor has not changed, as the function
is surprisingly costly on Mac with latest SDL (may be fixed in next SDL version). (#6113)
- Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate
scrolling impulses on Emscripten. (#4019, #6096) [@ocornut, @wolfpld, @tolopolarity]
- Backends: WebGPU: Fix building for latest WebGPU specs (remove implicit layout generation).
(#6117, #4116, #3632) [@tonygrue, @bfierz]
- Examples: refactord all examples to use a "MainLoopStep()" function. This is in order