mirror of https://github.com/mpv-player/mpv
24d6961833
Previously the mouse command never ended up in enter/leave keypresses for the default section even when logically required, because input.c does not know the area of the default section and relies on something feeding it ENTER/LEAVE presses - which the VO typically does but the mouse command didn't. Now the mouse command feeds it ENTER/LEAVE if required. It's possible to handle it differently and more consistently by: 1. reverting this commit. 2. Updating the default section area whenever the osd dimensions change. 3. Always ignore MOUSE_ENTER keys because the position is not known yet (but MOSE_MOVE typically follows right away). 4. On mouse move: first generate ENTER/LEAVE if required. That would guarantee consistency between mouse position and enter/leave events but could be more sensitive to manage (the default section has "infinite" area which is used to capture any event outside of specific section areas), while this commit keeps consistency same as before and depending on correct external feeding - which we now do better, even if still not optimally (like before, it's still technically possible that a script recieves MOUSE_ENTER and then reads the position before it got updated after the ENTER). |
||
---|---|---|
.. | ||
javascript | ||
lua | ||
audio.c | ||
client.c | ||
client.h | ||
command.c | ||
command.h | ||
configfiles.c | ||
core.h | ||
external_files.c | ||
external_files.h | ||
javascript.c | ||
loadfile.c | ||
lua.c | ||
main.c | ||
misc.c | ||
osd.c | ||
playloop.c | ||
screenshot.c | ||
screenshot.h | ||
scripting.c | ||
sub.c | ||
video.c |