Fix ReceivedCharacter not working with Alt held on Windows (#1282)

* Fix ReceivedCharacter with Alt held on Windows

* Update CHANGELOG.md
This commit is contained in:
Charles Helmich 2019-11-29 13:49:43 -07:00 committed by Osspial
parent 35a11ae24f
commit 07bdd3e218
2 changed files with 2 additions and 7 deletions

View file

@ -1,6 +1,7 @@
# Unreleased # Unreleased
- On macOS, fix application termination on `ControlFlow::Exit` - On macOS, fix application termination on `ControlFlow::Exit`
- On Windows, fix missing `ReceivedCharacter` events when Alt is held.
- On macOS, stop emitting private corporate characters in `ReceivedCharacter` events. - On macOS, stop emitting private corporate characters in `ReceivedCharacter` events.
- On X11, fix misreporting DPI factor at startup. - On X11, fix misreporting DPI factor at startup.
- On X11, fix events not being reported when using `run_return`. - On X11, fix events not being reported when using `run_return`.

View file

@ -1112,7 +1112,7 @@ unsafe extern "system" fn public_window_callback<T>(
0 0
} }
winuser::WM_CHAR => { winuser::WM_CHAR | winuser::WM_SYSCHAR => {
use crate::event::WindowEvent::ReceivedCharacter; use crate::event::WindowEvent::ReceivedCharacter;
use std::char; use std::char;
let is_high_surrogate = 0xD800 <= wparam && wparam <= 0xDBFF; let is_high_surrogate = 0xD800 <= wparam && wparam <= 0xDBFF;
@ -1145,12 +1145,6 @@ unsafe extern "system" fn public_window_callback<T>(
0 0
} }
// Prevents default windows menu hotkeys playing unwanted
// "ding" sounds. Alternatively could check for WM_SYSCOMMAND
// with wparam being SC_KEYMENU, but this may prevent some
// other unwanted default hotkeys as well.
winuser::WM_SYSCHAR => 0,
winuser::WM_SYSCOMMAND => { winuser::WM_SYSCOMMAND => {
if wparam == winuser::SC_SCREENSAVE { if wparam == winuser::SC_SCREENSAVE {
let window_state = subclass_input.window_state.lock(); let window_state = subclass_input.window_state.lock();