Skip to content

Commit

Permalink
Merge pull request #120 from DarkPro1337/develop
Browse files Browse the repository at this point in the history
Fix double execution of LeftClickCommand
  • Loading branch information
punker76 authored Oct 16, 2024
2 parents 113bbc0 + 9ddb1ce commit 3dcb446
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NotifyIconWpf/Interop/WindowMessageSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ private void ProcessWindowMessage(uint msg, IntPtr wParam, IntPtr lParam)
MouseEventReceived?.Invoke(MouseEvent.IconLeftMouseDown);
break;

case WindowsMessages.NIN_SELECT:
//Sent when the icon is selected with the left mouse button.
case WindowsMessages.WM_LBUTTONUP:
case WindowsMessages.NIN_SELECT when Version == NotifyIconVersion.Vista:
// Sent when the icon is selected with the left mouse button.
case WindowsMessages.WM_LBUTTONUP when Version != NotifyIconVersion.Vista:
if (!isDoubleClick)
{
MouseEventReceived?.Invoke(MouseEvent.IconLeftMouseUp);
Expand Down

0 comments on commit 3dcb446

Please sign in to comment.