X11: Fix modifiers being reported after release (#1262)

* X11: Fix modifiers being reported after release

* Moves `ModifiersChanged` variant from `WindowEvent` to `DeviceEvent`

* Add CHANGELOG entry
This commit is contained in:
Murarth 2019-11-10 00:16:44 -07:00 committed by Hal Gentz
parent dba21c06ed
commit c66784995d
6 changed files with 110 additions and 114 deletions

View file

@ -134,10 +134,6 @@ pub enum WindowEvent {
input: KeyboardInput,
},
/// Keyboard modifiers have changed
#[doc(hidden)]
ModifiersChanged { modifiers: ModifiersState },
/// The cursor has moved on the window.
CursorMoved {
device_id: DeviceId,
@ -266,7 +262,15 @@ pub enum DeviceEvent {
button: ButtonId,
state: ElementState,
},
Key(KeyboardInput),
/// Keyboard modifiers have changed
#[doc(hidden)]
ModifiersChanged {
modifiers: ModifiersState,
},
Text {
codepoint: char,
},