mirror of https://github.com/mpv-player/mpv
wayland: clear saved mpkey more aggressively
Introduced by 1f8013ff3f
. We try to save
the mpkey so it can be used in the modifier event that comes next if
appropriate and also clear it when needed. The problem is that the
condition for clearing is too strict and things like mismatched cases
and so on can make mpkey on the corresponding key release event not
match the saved mpkey even though in reality they were the same key.
Loosen the check by simply always clearing the saved mpkey as long as
there was some key found and the state is up. We don't handle multiple
keys at the same time anyways (they're interpreted in a sequence), so it
should be hopefully OK.
This commit is contained in:
parent
64db68639d
commit
221a574a50
|
@ -452,7 +452,7 @@ static void keyboard_handle_key(void *data, struct wl_keyboard *wl_keyboard,
|
|||
}
|
||||
if (state == MP_KEY_STATE_DOWN)
|
||||
wl->mpkey = mpkey;
|
||||
if (wl->mpkey == mpkey && state == MP_KEY_STATE_UP)
|
||||
if (mpkey && state == MP_KEY_STATE_UP)
|
||||
wl->mpkey = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue