Send mouseleft event when the mouse leaves the window (#928)
* Send `mouseleft` event when the mouse leaves the window * Call `View:on_mouse_left` when the mouse leaves the `View` Previously `View:on_mouse_left` was called only when the mouse left the window, and it was called on every visible `View`. Now it gets also called when the mouse "changes" `View`, and only the last `View` the mouse was on will receive the event.
This commit is contained in:
@@ -1136,6 +1136,8 @@ function core.on_event(type, ...)
|
||||
end
|
||||
elseif type == "mousereleased" then
|
||||
core.root_view:on_mouse_released(...)
|
||||
elseif type == "mouseleft" then
|
||||
core.root_view:on_mouse_left()
|
||||
elseif type == "mousewheel" then
|
||||
if not core.root_view:on_mouse_wheel(...) then
|
||||
did_keymap = keymap.on_mouse_wheel(...)
|
||||
|
||||
Reference in New Issue
Block a user