Skip to content

Commit

Permalink
Fix MouseButton::Other value on Windows
Browse files Browse the repository at this point in the history
This was a mistake in the transition to windows-sys: rust-windowing#2057

We used winapi's GET_XBUTTON_WPARAM before which is using HIWORD instead of LOWORD: https://docs.rs/winapi/0.3.9/src/winapi/um/winuser.rs.html#1297-1299
  • Loading branch information
madsmtm committed Nov 22, 2022
1 parent 05484c5 commit 69d1a2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre

# Unreleased

- On Windows, fix the value in `MouseButton::Other`.
- On Windows, fix icons specified on `WindowBuilder` not taking effect for windows created after the first one.
- On Windows and macOS, add `Window::title` to query the current window title.
- On Windows, fix focusing menubar when pressing `Alt`.
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/windows/mod.rs
Expand Up @@ -120,7 +120,7 @@ impl From<u64> for WindowId {

#[inline(always)]
const fn get_xbutton_wparam(x: u32) -> u16 {
loword(x)
hiword(x)
}

#[inline(always)]
Expand Down

0 comments on commit 69d1a2c

Please sign in to comment.