Skip to content

Commit

Permalink
fix(windows): fix focus event emission on minimize (#559)
Browse files Browse the repository at this point in the history
ref: rust-windowing/winit#2496

Co-authored-by: killian <[email protected]>

Co-authored-by: killian <[email protected]>
  • Loading branch information
amrbashir and killianc3 authored Sep 21, 2022
1 parent bc8334e commit 37bca31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/focus-minimize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": "patch"
---

On Windows, fixed focus event emission on minimize.
2 changes: 1 addition & 1 deletion src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ unsafe fn public_window_callback_inner<T: 'static>(
}

win32wm::WM_NCACTIVATE => {
let is_active = wparam == WPARAM(1);
let is_active = wparam != WPARAM(0);
let active_focus_changed = subclass_input.window_state.lock().set_active(is_active);
if active_focus_changed {
if is_active {
Expand Down

0 comments on commit 37bca31

Please sign in to comment.