Skip to content

notifyicon.go: remove the WM_LBUTTONUP handler in favor of NIN_SELECT#141

Merged
nickkhyl merged 1 commit into
mainfrom
nickkhyl/fix-notifyicon-leftclick
Jul 2, 2026
Merged

notifyicon.go: remove the WM_LBUTTONUP handler in favor of NIN_SELECT#141
nickkhyl merged 1 commit into
mainfrom
nickkhyl/fix-notifyicon-leftclick

Conversation

@nickkhyl

@nickkhyl nickkhyl commented Jul 2, 2026

Copy link
Copy Markdown
Member

NIN_SELECT was added in Windows 2000 and is sent along with WM_LBUTTONUP. We added support for NIN_SELECT in 6376def, but left WM_LBUTTONUP unchanged, closing the context menu as soon as it's opened by left-click and causing MouseUp handlers to run twice.

Updates tailscale/corp#44417
Updates tailscale/corp#38195

NIN_SELECT was added in Windows 2000 and is sent along with WM_LBUTTONUP.
We added support for NIN_SELECT in 6376def,
but left WM_LBUTTONUP unchanged, closing the context menu as soon as it's opened
by left-click and causing MouseUp handlers to run twice.

Updates tailscale/corp#44417
Updates tailscale/corp#38195

Signed-off-by: Nick Khyl <nickk@tailscale.com>
@nickkhyl
nickkhyl requested a review from dblohm7 July 2, 2026 18:24
Comment thread notifyicon.go
// Creating the window with WS_DISABLED in an effort to dissuade screen
// readers from treating the hidden window as focusable content.
Style: win.WS_OVERLAPPEDWINDOW | win.WS_DISABLED,
Style: win.WS_OVERLAPPEDWINDOW | win.WS_DISABLED,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't really touch this, but it looks like the previous commit wasn't formatted with go fmt.

@dblohm7 dblohm7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had also taken care of this in #140, but sure.

@nickkhyl

nickkhyl commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Oh, right. I remember #140, but the commit message doesn't say anything about fixing a regression, and I missed that it also removes the WM_LBUTTONUP handler.

@nickkhyl
nickkhyl merged commit c7920db into main Jul 2, 2026
2 checks passed
@nickkhyl
nickkhyl deleted the nickkhyl/fix-notifyicon-leftclick branch July 2, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants