diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-13 14:50:27 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-14 21:55:20 +0000 |
commit | 9d7638a6f21dffe20c0d00df70087a3be90d2139 (patch) | |
tree | d7af2bc0f535989216cd18bf680d874e18d7a8d1 /video/out | |
parent | 221a574a503604fbda6f25f171852d99e49de06b (diff) | |
download | mpv-9d7638a6f21dffe20c0d00df70087a3be90d2139.tar.bz2 mpv-9d7638a6f21dffe20c0d00df70087a3be90d2139.tar.xz |
wayland: clear all keys on keyboard_handle_leave
There was no known problem with this, but according to the wayland
spec*, "After this event client must assume that no keys are
pressed...", so go ahead and do that.
*: https://gitlab.freedesktop.org/wayland/wayland/-/blob/72da004b3eed19a94265d564f1fa59276ceb4340/protocol/wayland.xml#L2449
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/wayland_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 7c5e0e6a93..983609dd83 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -423,6 +423,10 @@ static void keyboard_handle_leave(void *data, struct wl_keyboard *wl_keyboard, { struct vo_wayland_state *wl = data; wl->has_keyboard_input = false; + wl->keyboard_code = 0; + wl->mpkey = 0; + wl->mpmod = 0; + mp_input_put_key(wl->vo->input_ctx, MP_INPUT_RELEASE_ALL); guess_focus(wl); } |