summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Cawley <ccawley2011@gmail.com>2019-07-07 16:07:06 +0100
committerwm4 <1387750+wm4@users.noreply.github.com>2019-10-28 17:14:49 +0100
commitc2ab4d22b4ca8cceb5cebe1ec966722fcfd3101d (patch)
treea24533e63fde7206c4017737ed187fcb8afefe01
parent619b466cef4946cd186a7266dbae39ad37131cb0 (diff)
downloadmpv-c2ab4d22b4ca8cceb5cebe1ec966722fcfd3101d.tar.bz2
mpv-c2ab4d22b4ca8cceb5cebe1ec966722fcfd3101d.tar.xz
vo_sdl: Acknowledge when the mouse enters or leaves the window
-rw-r--r--video/out/vo_sdl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index 257762d147..b62f3273cb 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -536,6 +536,12 @@ static void wait_events(struct vo *vo, int64_t until_time_us)
check_resize(vo);
vo_event(vo, VO_EVENT_RESIZE);
break;
+ case SDL_WINDOWEVENT_ENTER:
+ mp_input_put_key(vo->input_ctx, MP_KEY_MOUSE_ENTER);
+ break;
+ case SDL_WINDOWEVENT_LEAVE:
+ mp_input_put_key(vo->input_ctx, MP_KEY_MOUSE_LEAVE);
+ break;
}
break;
case SDL_QUIT: