mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
mplayer: don't hide mouse cursor if mouse is inside mouse area
This commit is contained in:
parent
831a7cf3ee
commit
e0d3dc3857
@ -2169,5 +2169,9 @@ int mp_input_check_interrupt(struct input_ctx *ictx, int time)
|
||||
|
||||
unsigned int mp_input_get_mouse_event_counter(struct input_ctx *ictx)
|
||||
{
|
||||
// Make the frontend always display the mouse cursor (as long as it's not
|
||||
// forced invisible) if mouse input is desired.
|
||||
if (mp_input_test_mouse_active(ictx, ictx->mouse_x, ictx->mouse_y))
|
||||
ictx->mouse_event_counter++;
|
||||
return ictx->mouse_event_counter;
|
||||
}
|
||||
|
@ -3378,7 +3378,7 @@ static void run_playloop(struct MPContext *mpctx)
|
||||
// ================================================================
|
||||
vo_check_events(vo);
|
||||
|
||||
double mouse_event_ts = mp_input_get_mouse_event_counter(mpctx->input);
|
||||
unsigned mouse_event_ts = mp_input_get_mouse_event_counter(mpctx->input);
|
||||
if (mpctx->mouse_event_ts != mouse_event_ts) {
|
||||
mpctx->mouse_event_ts = mouse_event_ts;
|
||||
if (opts->vo.cursor_autohide_delay > -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user