You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CursorState::Grab does not report mouse delta on macOS #165
You still get MouseMoved events with the absolute position of the mouse, but it does not change. As a result, it's kind of useless. According to macOS documentation, you should instead check for deltaX and deltaY on the NSEvent.
As far as I can tell, winit doesn't currently report the mouse cursor delta in any events. I think it makes sense to add the mouse delta to the MouseMoved event. Any thoughts?
#164 introduced API for raw input events, which is more appropriate for things like first-person camera control. Would it make more sense to extend the macos backend with support generating such events? It seems to me that you generally want either high-resolution unfiltered relative mouse movement data or filtered window-space pointer positions, not filtered window-space relative pointer movement, and not both at once.
@Ralith Will we need a new DeviceEvent variant for mouse movement based on the API you introduced? I see that it exposes an axis and an f64 value, which might not be suitable for platforms like Windows where raw input is reported as one event from the OS
As discussed on IRC, the intention of DeviceEvent is explicitly that multiple events be generated if a host even contains motion on multiple axes. For example, an X11 device event may represent motion on arbitrarily many axes at once, but instead of introducing a dynamically allocated vector, we just generate N separate motion events.
edit for posterity: @LPGhatguy has convinced me that it's worth having input device class specific event types for the sake of API usability.
Activity
Ralith commentedon May 10, 2017
#164 introduced API for raw input events, which is more appropriate for things like first-person camera control. Would it make more sense to extend the macos backend with support generating such events? It seems to me that you generally want either high-resolution unfiltered relative mouse movement data or filtered window-space pointer positions, not filtered window-space relative pointer movement, and not both at once.
LPGhatguy commentedon May 22, 2017
@Ralith Will we need a new
DeviceEventvariant for mouse movement based on the API you introduced? I see that it exposes an axis and anf64value, which might not be suitable for platforms like Windows where raw input is reported as one event from the OSRalith commentedon May 22, 2017
As discussed on IRC, the intention of
DeviceEventis explicitly that multiple events be generated if a host even contains motion on multiple axes. For example, an X11 device event may represent motion on arbitrarily many axes at once, but instead of introducing a dynamically allocated vector, we just generate N separate motion events.edit for posterity: @LPGhatguy has convinced me that it's worth having input device class specific event types for the sake of API usability.
swiftcoder commentedon Jun 29, 2019
This is complete, right?
DeviceEvent::MouseMotionhas existed for some time now.Stop using triangle fans for DX12/Vulkan compatibility.
fix(macos): make sure `set_icon_as_template` is a mutable reference (r…