summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-19 18:45:02 +0200
committerwm4 <wm4@nowhere>2013-06-29 22:58:13 +0200
commite0d3dc3857797c886b3d53c13d153492531a4bcc (patch)
treec1b5d4c0268d16558fc4bf5522a22e78b204b6df
parent831a7cf3eea1015a76f4accba4f4d237a5336f7b (diff)
downloadmpv-e0d3dc3857797c886b3d53c13d153492531a4bcc.tar.bz2
mpv-e0d3dc3857797c886b3d53c13d153492531a4bcc.tar.xz
mplayer: don't hide mouse cursor if mouse is inside mouse area
-rw-r--r--core/input/input.c4
-rw-r--r--core/mplayer.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/core/input/input.c b/core/input/input.c
index ba35efd0e6..038d6507bb 100644
--- a/core/input/input.c
+++ b/core/input/input.c
@@ -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;
}
diff --git a/core/mplayer.c b/core/mplayer.c
index 567e38e285..eb99b0d2d2 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -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) {