1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 05:15:12 +00:00

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

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 // First look whether a mouse section is capturing all mouse input
// exclusively (regardless of the active section stack order). // 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 = struct cmd_bind *bind =
find_bind_for_key_section(ictx, ictx->mouse_section, code); find_bind_for_key_section(ictx, ictx->mouse_section, code);
if (bind) if (bind)