From bceb1eeaf49eb98d208a97e1308804f91ef7a6f1 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Wed, 15 Apr 2026 23:18:20 -0400 Subject: [PATCH] Revert "player/command: don't send mouse move event on mouse leave request" There is no reason to do this, since VOs do report mouse position when outside of window in some cases. This reverts commit 3ff7b0479012681805933a808a2d35053c905aa6. --- player/command.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/player/command.c b/player/command.c index a03c700bdd..95cfc1e59d 100644 --- a/player/command.c +++ b/player/command.c @@ -7052,8 +7052,7 @@ static void cmd_mouse(void *p) if (button == -1) {// no button if (pre_key) mp_input_put_key_artificial(mpctx->input, pre_key, 1); - if (pre_key != MP_KEY_MOUSE_LEAVE) - mp_input_set_mouse_pos_artificial(mpctx->input, x, y); + mp_input_set_mouse_pos_artificial(mpctx->input, x, y); return; } if (button < 0 || button >= MP_KEY_MOUSE_BTN_COUNT) {// invalid button @@ -7071,10 +7070,8 @@ static void cmd_mouse(void *p) button += dbc ? MP_MBTN_DBL_BASE : MP_MBTN_BASE; if (pre_key) mp_input_put_key_artificial(mpctx->input, pre_key, 1); - if (pre_key != MP_KEY_MOUSE_LEAVE) { - mp_input_set_mouse_pos_artificial(mpctx->input, x, y); - mp_input_put_key_artificial(mpctx->input, button, 1); - } + mp_input_set_mouse_pos_artificial(mpctx->input, x, y); + mp_input_put_key_artificial(mpctx->input, button, 1); } static void cmd_key(void *p)