/// Emit a `ModifiersChanged` event whenever modifiers have changed.
Emit a `ModifiersChanged` event whenever modifiers have changed.
Emit a ` ModifiersChanged ` event whenever modifiers have changed .
fn update_modifiers<T>(window: HWND, subclass_input: &SubclassInput<T>) {
    use crate::event::WindowEvent::ModifiersChanged;
    let modifiers = event::get_key_mods();
    let mut window_state = subclass_input.window_state.lock();
    if window_state.modifiers_state != modifiers {
        window_state.modifiers_state = modifiers;
        // Drop lock
        drop(window_state);
        unsafe {
            subclass_input.send_event(Event::WindowEvent {
                window_id: RootWindowId(WindowId(window)),
                event: ModifiersChanged(modifiers),
            });
        }
    }
}
fn update_modifiers < T > ( window : HWND , subclass_input : & SubclassInput < T > ) { use crate :: event :: WindowEvent :: ModifiersChanged ; let modifiers = event :: get_key_mods ( ) ; let mut window_state = subclass_input . window_state . lock ( ) ; if window_state . modifiers_state != modifiers { window_state . modifiers_state = modifiers ; // Drop lock drop ( window_state ) ; unsafe { subclass_input . send_event ( Event :: WindowEvent { window_id : RootWindowId ( WindowId ( window ) ) , event : ModifiersChanged ( modifiers ) , } ) ; } } }
Emit a `ModifiersChanged` event whenever modifiers have changed.
Emit a ` ModifiersChanged ` event whenever modifiers have changed .
window
HWND
subclass_input
&SubclassInput<T>