windows: Don't propagate window char message (#9470)

we were accidentally calling the input handler even when the keydown
event asked it not to be propagated

Release Notes:

- N/A
This commit is contained in:
Ezekiel Warren 2024-03-18 11:02:15 -07:00 committed by GitHub
parent 0e83b22583
commit 31aaee9130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -572,7 +572,9 @@ impl WindowsWindowInner {
keystroke,
is_held: lparam.0 & (0x1 << 30) > 0,
};
if func(PlatformInput::KeyDown(event)).default_prevented {
let dispatch_event_result = func(PlatformInput::KeyDown(event));
if dispatch_event_result.default_prevented || !dispatch_event_result.propagate {
self.invalidate_client_area();
return LRESULT(0);
}