0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

input: filter out redundant mp_input_set_mouse_pos() calls

Prevents the OSC from showing up on start on Cocoa.

(cherry picked from commit 51120c9c7f)
This commit is contained in:
wm4 2015-05-08 22:00:24 +02:00 committed by Diogo Franco (Kovensky)
parent 01c452cfba
commit 5f81da0b88

View File

@ -702,7 +702,9 @@ void mp_input_set_mouse_pos(struct input_ctx *ictx, int x, int y)
input_lock(ictx);
MP_DBG(ictx, "mouse move %d/%d\n", x, y);
if (!ictx->opts->enable_mouse_movements) {
if ((ictx->mouse_vo_x == x && ictx->mouse_vo_y == y) ||
!ictx->opts->enable_mouse_movements)
{
input_unlock(ictx);
return;
}