Skip to content

Commit

Permalink
fix: remove button_state field in TrayIconEvent::DoubleClick variant
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Aug 26, 2024
1 parent 88b8244 commit 981531a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changes/double-click-remove-button-state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tray-icon": "minor"
---

Removed `button_state` field in `TrayIconEvent::DoubleClick` variant.
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ pub enum TrayIconEvent {
rect: Rect,
/// Mouse button that triggered this event.
button: MouseButton,
/// Mouse button state when this event was triggered.
button_state: MouseButtonState,
},
/// The mouse entered the tray icon region.
Enter {
Expand Down
3 changes: 0 additions & 3 deletions src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,21 +400,18 @@ unsafe extern "system" fn tray_proc(
rect,
position,
button: MouseButton::Left,
button_state: MouseButtonState::Up,
},
WM_RBUTTONDBLCLK => TrayIconEvent::DoubleClick {
id,
rect,
position,
button: MouseButton::Right,
button_state: MouseButtonState::Up,
},
WM_MBUTTONDBLCLK => TrayIconEvent::DoubleClick {
id,
rect,
position,
button: MouseButton::Middle,
button_state: MouseButtonState::Up,
},
WM_MOUSEMOVE if !userdata.entered => {
userdata.entered = true;
Expand Down

0 comments on commit 981531a

Please sign in to comment.