diff options
author | wm4 <wm4@nowhere> | 2015-05-08 22:00:24 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-09 21:15:04 +0900 |
commit | 5f81da0b88b7e8156a5149e5eea31732d77ef0bd (patch) | |
tree | 788ec1067a664bfa3ba360d565b2560b662e6984 | |
parent | 01c452cfba04a16872e918bd6781c2c8d00a3f18 (diff) | |
download | mpv-5f81da0b88b7e8156a5149e5eea31732d77ef0bd.tar.bz2 mpv-5f81da0b88b7e8156a5149e5eea31732d77ef0bd.tar.xz |
input: filter out redundant mp_input_set_mouse_pos() calls
Prevents the OSC from showing up on start on Cocoa.
(cherry picked from commit 51120c9c7fc23bc7009dfddd2132a8e8ef9e466e)
-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; } |