Skip to content

Commit 3dcb446

Browse files
authored
Merge pull request #120 from DarkPro1337/develop
Fix double execution of LeftClickCommand
2 parents 113bbc0 + 9ddb1ce commit 3dcb446

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/NotifyIconWpf/Interop/WindowMessageSink.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ private void ProcessWindowMessage(uint msg, IntPtr wParam, IntPtr lParam)
251251
MouseEventReceived?.Invoke(MouseEvent.IconLeftMouseDown);
252252
break;
253253

254-
case WindowsMessages.NIN_SELECT:
255-
//Sent when the icon is selected with the left mouse button.
256-
case WindowsMessages.WM_LBUTTONUP:
254+
case WindowsMessages.NIN_SELECT when Version == NotifyIconVersion.Vista:
255+
// Sent when the icon is selected with the left mouse button.
256+
case WindowsMessages.WM_LBUTTONUP when Version != NotifyIconVersion.Vista:
257257
if (!isDoubleClick)
258258
{
259259
MouseEventReceived?.Invoke(MouseEvent.IconLeftMouseUp);

0 commit comments

Comments
 (0)