diff options
author | wm4 <wm4@nowhere> | 2015-05-08 22:00:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-08 22:00:24 +0200 |
commit | 51120c9c7fc23bc7009dfddd2132a8e8ef9e466e (patch) | |
tree | cf5f42ae37bef872e3c2bf8be65960e5a231509c /input/input.c | |
parent | f9e2d5026e4e9b0685137033dc08e2dc9034e5fc (diff) | |
download | mpv-51120c9c7fc23bc7009dfddd2132a8e8ef9e466e.tar.bz2 mpv-51120c9c7fc23bc7009dfddd2132a8e8ef9e466e.tar.xz |
input: filter out redundant mp_input_set_mouse_pos() calls
Prevents the OSC from showing up on start on Cocoa.
Diffstat (limited to 'input/input.c')
-rw-r--r-- | input/input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c index 2a108be1d2..1a6931a12a 100644 --- a/input/input.c +++ b/input/input.c @@ -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; } |