mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Fix ModifiersChanged event on X11 (#1358)
This commit is contained in:
parent
c0b46a03b5
commit
d1c6506865
|
@ -1,5 +1,7 @@
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- On X11, fix `ModifiersChanged` emitting incorrect modifier change events
|
||||||
|
|
||||||
# 0.20.0 Alpha 6 (2020-01-03)
|
# 0.20.0 Alpha 6 (2020-01-03)
|
||||||
|
|
||||||
- On macOS, fix `set_cursor_visible` hides cursor outside of window.
|
- On macOS, fix `set_cursor_visible` hides cursor outside of window.
|
||||||
|
|
|
@ -18,9 +18,9 @@ impl ModifiersState {
|
||||||
|
|
||||||
pub(crate) fn from_x11_mask(mask: c_uint) -> Self {
|
pub(crate) fn from_x11_mask(mask: c_uint) -> Self {
|
||||||
let mut m = ModifiersState::empty();
|
let mut m = ModifiersState::empty();
|
||||||
m.set(ModifiersState::SHIFT, mask & ffi::Mod1Mask != 0);
|
m.set(ModifiersState::ALT, mask & ffi::Mod1Mask != 0);
|
||||||
m.set(ModifiersState::CTRL, mask & ffi::ShiftMask != 0);
|
m.set(ModifiersState::SHIFT, mask & ffi::ShiftMask != 0);
|
||||||
m.set(ModifiersState::ALT, mask & ffi::ControlMask != 0);
|
m.set(ModifiersState::CTRL, mask & ffi::ControlMask != 0);
|
||||||
m.set(ModifiersState::LOGO, mask & ffi::Mod4Mask != 0);
|
m.set(ModifiersState::LOGO, mask & ffi::Mod4Mask != 0);
|
||||||
m
|
m
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue