Fix freeze when pressing modifier keys on Windows (#1503)

This commit is contained in:
Imberflur 2020-03-08 01:22:53 -05:00 committed by GitHub
parent b1d8ce24e9
commit e85a80dd65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -610,6 +610,9 @@ fn update_modifiers<T>(window: HWND, subclass_input: &SubclassInput<T>) {
if window_state.modifiers_state != modifiers { if window_state.modifiers_state != modifiers {
window_state.modifiers_state = modifiers; window_state.modifiers_state = modifiers;
// Drop lock
drop(window_state);
unsafe { unsafe {
subclass_input.send_event(Event::WindowEvent { subclass_input.send_event(Event::WindowEvent {
window_id: RootWindowId(WindowId(window)), window_id: RootWindowId(WindowId(window)),