mirror of
https://github.com/mpv-player/mpv
synced 2024-12-11 09:25:56 +00:00
input: handle MOUSE_LEAVE specially
Do this so that MOUSE_LEAVE can't be combined with other keys. (E.g. keep 'w' pressed, then move the mouse outside of the mpv window; it will print a warning what w-MOUSE_LEAVE is not mapped.)
This commit is contained in:
parent
0d90dd07ff
commit
3871024ec3
@ -1586,6 +1586,14 @@ static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale)
|
|||||||
update_mouse_section(ictx);
|
update_mouse_section(ictx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (code == MP_KEY_MOUSE_LEAVE) {
|
||||||
|
update_mouse_section(ictx);
|
||||||
|
struct mp_cmd *cmd = get_cmd_from_keys(ictx, NULL, 1, (int[]){code});
|
||||||
|
if (cmd)
|
||||||
|
queue_add_tail(&ictx->cmd_queue, cmd);
|
||||||
|
ictx->got_new_events = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
double now = mp_time_sec();
|
double now = mp_time_sec();
|
||||||
int doubleclick_time = ictx->doubleclick_time;
|
int doubleclick_time = ictx->doubleclick_time;
|
||||||
// ignore system-doubleclick if we generate these events ourselves
|
// ignore system-doubleclick if we generate these events ourselves
|
||||||
|
Loading…
Reference in New Issue
Block a user