godotengine / godotengine/godot
Mouse Force Pass Scroll Events is not working on Emulate Touch from Mouse
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in: v4.2.1.stable.mono.official [b09f793f5], v4.3.beta2.mono.official [b75f0485b]
### System information
Godot v4.3.beta2.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (NVIDIA; 31.0.15.3114) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)
### Issue description
mouse_force_pass_scroll_events seems not working. As far as I understand, [mouse_force_pass_scroll_events](https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-property-mouse-force-pass-scroll-events) should force mouse filter Pass to its parent even if it set to stop so that the scroll container can scroll.
### Steps to reproduce
I enabled emulate_touch_from_mouse before testing it. I used ScrollContainer, followed by VBoxContainer and fill it with ColorRect to test it. During Enabling mouse_force_pass_scroll_events while putting stop on mouse_filter, scrolling with mouse drag does nothing, except for the small gap between the ColorRects. As a reference for my own, I set pass on mouse_filter and it works fine.
### Minimal reproduction project (MRP)
[scrollcontainer.zip](https://github.com/user-attachments/files/16146624/scrollcontainer.zip)
Edit:
I've done a little bit more testing on android (for Godot v4.2.1) with both enabling/disabling emulate_mouse_from_touch. During Enabling mouse_force_pass_scroll_events while putting stop on mouse_filter, it gives similar result. As another reference for my own, I set pass on mouse_filter and it works fine, but doesn't work when I disabled emulate_mouse_from_touch.
Contributor guide
Research direction
Start with the attached scrollcontainer.zip reproduction and the Control documentation for mouse_force_pass_scroll_events, then compare behavior with mouse_filter set to pass versus stop while emulate_touch_from_mouse is enabled. Done means the ScrollContainer scrolls correctly during mouse-drag scrolling with mouse_filter set to stop and mouse_force_pass_scroll_events enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100