wpf-notifyicon icon indicating copy to clipboard operation
wpf-notifyicon copied to clipboard

Context Menu getting shown when left clicking

Open ptdev opened this issue 2 years ago • 2 comments

As requested, opening an issue for the code comment made here

Basically, as long as a context menu is set, left clicking the icon will always trigger it after the commit mentioned above. Tested on Windows 11

Cheers.

ptdev avatar May 25 '22 03:05 ptdev

Also confirmed on Windows 10.
Always displays the context menu.

2022-05-31 152655

devpelux avatar May 31 '22 13:05 devpelux

From https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shell_notifyicona#remarks

If a user selects a notify icon with the mouse and activates it with the ENTER key, the Shell now sends the associated application an NIN_SELECT notification. Earlier versions send WM_RBUTTONDOWN and WM_RBUTTONUP messages.

I think more complex behavior needs to be implemented here. Prior to Windows Vista, this was a right click. And now it is logical that the user should be able to customize the behavior.

HavenDV avatar Jun 16 '22 00:06 HavenDV