natural-harmonia-gropius / input-event

InputEvent.lua for mpv-player, enhanced input.conf with better, conflict-free, low-latency event mechanism.
MIT License
45 stars 5 forks source link

Handle the drag #8

Closed natural-harmonia-gropius closed 1 year ago

natural-harmonia-gropius commented 2 years ago

Fix https://github.com/Natural-Harmonia-Gropius/InputEvent/issues/2

natural-harmonia-gropius commented 1 year ago

Stalled getter of geometry needs to be implemented, https://github.com/mpv-player/mpv/issues/10788 and this issue only happens during input-doubleclick-time. (default to 300ms)

natural-harmonia-gropius commented 1 year ago

delete branch

mp.observe_property("geometry", "native", function(_, geometry)
    print(geometry)
    local binding = bind_map["MBTN_LEFT"]
    if not binding then return end
    print(binding.queue[#binding.queue])
    binding.queue = table.filter(binding.queue, function(i) return i ~= #binding.queue end)
end)
xfzv commented 1 year ago

I'm also using christoph-heinrich/mpv-pointer-event just to be able to drag with MBTN_LEFT.

I'm curious as to why it can handle it while it doesn't seem to be the case for InputEvent?

natural-harmonia-gropius commented 1 year ago

For users who have window-dragging (default=yes), the drag is not usable in windowed mode. For me I just want to prevent the click event if window be dragged. But at least in Windows the getter of geometry not yet implemented.

If you need mouse gestures, that would be a standalone script.