Skip to content

Commit

Permalink
fix(windows): fix enter event only emitted once (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored Jun 4, 2024
1 parent f3ff708 commit e257d6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/enter-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tray-icon": "patch"
---

On Windows, fix `Enter` event emitted only once and never emitted again.
1 change: 1 addition & 0 deletions src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ unsafe extern "system" fn tray_proc(

if !in_x || !in_y {
KillTimer(hwnd, WM_USER_LEAVE_TIMER_ID as _);
userdata.entered = false;

TrayIconEvent::send(TrayIconEvent::Leave {
id: userdata.id.clone(),
Expand Down

0 comments on commit e257d6b

Please sign in to comment.