Make winit focus take activity into account on Windows (#2159)
winit's notion of "focus" is very simple; you're either focused or not. However, Windows has both notions of focused window and active window and paying attention only to WM_SETFOCUS/WM_KILLFOCUS can cause a window to believe the user is interacting with it when they're not. (this manifests when a user switches to another application between when a winit application starts and it creates its first window)
This commit is contained in:
parent
9116b6c8cd
commit
1091a8ba1a
3 changed files with 114 additions and 62 deletions
|
|
@ -71,6 +71,7 @@ And please only add new entries to the top of this list, right below the `# Unre
|
|||
- Added `MonitorHandle::refresh_rate_millihertz` to get monitor's refresh rate.
|
||||
- **Breaking**, Replaced `VideoMode::refresh_rate` with `VideoMode::refresh_rate_millihertz` providing better precision.
|
||||
- On Web, add `with_prevent_default` and `with_focusable` to `WindowBuilderExtWebSys` to control whether events should be propagated.
|
||||
- On Windows, fix focus events being sent to inactive windows.
|
||||
|
||||
# 0.26.1 (2022-01-05)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue