ScenicFramework / scenic

Core Scenic library
Apache License 2.0
1.99k stars 137 forks source link

V0.11 requesting :cursor_scroll input not sending :cursor_scroll events to scene #226

Closed vacarsu closed 3 years ago

vacarsu commented 3 years ago

In the init function I request_input(scene, [:cursor_scroll]) and have a handle input to receive the message. However the handle_input never gets hit. I'm using the macbook trackpad, maybe it is not compatible with scenic?

def handle_input(
    {:cursor_scroll, {offset, position}},
    _,
    %{assigns: %{state: _state}} = scene
  ) do
    Logger.debug(inspect offset)
    Logger.debug(inspect position)

    {:noreply, scene}
end
boydm commented 3 years ago

This is fixed in the v0.11 branch.

This includes a few other input bugs/changes. The big one is that :cursor_pos and :cursor_scroll inputs are sent to all scenes that requested them, not just those who's :input style the cursor is over.

If you could verify the fix works for you , then close the issue, that would be appreciated.

vacarsu commented 3 years ago

Working now!