Skip to content

Commit 9ddb1ce

Browse files
DarkPro1337punker76
authored andcommitted
Remove redundant WM_LBUTTONUP handling
- Remove redundant WM_LBUTTONUP handling for notification icon clicks, left clicks now handled only by NIN_SELECT. - Fixed LeftClickCommand double execute due to WM_LBUTTONUP was handled.
1 parent 113bbc0 commit 9ddb1ce

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)