fix: touch input (#412)

`mouse-pos.hover` may or may not be false during touch input
(contrary to mouse input, where false means the cursor left the window)

Detecting a change to false as a leave event, while allowing any
other mouse-pos update to cause an enter event solves this.
This commit is contained in:
christoph-heinrich
2023-01-02 08:51:49 +01:00
committed by GitHub
parent e66c8fbf88
commit 5a02c6d205
2 changed files with 8 additions and 5 deletions

View File

@@ -152,7 +152,7 @@ mp.set_key_bindings({
'mbtn_left',
Elements:create_proximity_dispatcher('mbtn_left_up'),
function(...)
update_mouse_pos(nil, mp.get_property_native('mouse-pos'), true)
update_mouse_pos(nil, mp.get_property_native('mouse-pos'))
Elements:proximity_trigger('mbtn_left_down', ...)
end,
},