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.
This commit is contained in:
wm4 2014-04-26 20:27:52 +02:00
parent d44dd30ac7
commit a29597cb65
1 changed files with 1 additions and 1 deletions

View File

@ -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)