Skip to content

Commit

Permalink
Fix ModifiersChanged event on X11 (#1358)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduerr authored and murarth committed Jan 4, 2020
1 parent c0b46a0 commit d1c6506
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- On X11, fix `ModifiersChanged` emitting incorrect modifier change events

# 0.20.0 Alpha 6 (2020-01-03)

- On macOS, fix `set_cursor_visible` hides cursor outside of window.
Expand Down
6 changes: 3 additions & 3 deletions src/platform_impl/linux/x11/util/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ impl ModifiersState {

pub(crate) fn from_x11_mask(mask: c_uint) -> Self {
let mut m = ModifiersState::empty();
m.set(ModifiersState::SHIFT, mask & ffi::Mod1Mask != 0);
m.set(ModifiersState::CTRL, mask & ffi::ShiftMask != 0);
m.set(ModifiersState::ALT, mask & ffi::ControlMask != 0);
m.set(ModifiersState::ALT, mask & ffi::Mod1Mask != 0);
m.set(ModifiersState::SHIFT, mask & ffi::ShiftMask != 0);
m.set(ModifiersState::CTRL, mask & ffi::ControlMask != 0);
m.set(ModifiersState::LOGO, mask & ffi::Mod4Mask != 0);
m
}
Expand Down

0 comments on commit d1c6506

Please sign in to comment.