summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-08 22:00:24 +0200
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-05-09 21:15:04 +0900
commit5f81da0b88b7e8156a5149e5eea31732d77ef0bd (patch)
tree788ec1067a664bfa3ba360d565b2560b662e6984
parent01c452cfba04a16872e918bd6781c2c8d00a3f18 (diff)
downloadmpv-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.c4
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;
}