From a29597cb65dbaf079019d582db31382f42bb7106 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 26 Apr 2014 20:27:52 +0200 Subject: input: fix mouse_leave/OSC behavior This essentially reverts commit cca13efb. The code in the if was supposed to be run only if the mouse button was down, because in this case the mouse area is never considered to be left. Since it was run for every mouse button, mouse_leave wasn't sent. Fixes #745. --- input/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/input.c b/input/input.c index 63526138e7..e66d7ef34b 100644 --- a/input/input.c +++ b/input/input.c @@ -431,7 +431,7 @@ static struct cmd_bind *find_any_bind_for_key(struct input_ctx *ictx, // First look whether a mouse section is capturing all mouse input // exclusively (regardless of the active section stack order). - if (use_mouse) { + if (use_mouse && MP_KEY_IS_MOUSE_BTN_SINGLE(ictx->last_key_down)) { struct cmd_bind *bind = find_bind_for_key_section(ictx, ictx->mouse_section, code); if (bind) -- cgit v1.2.3