mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 21:31:29 +11:00
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:
parent
35a11ae24f
commit
07bdd3e218
|
@ -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`.
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue