Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions notifyicon.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ func (ni *NotifyIcon) wndProc(hwnd win.HWND, msg uint16, wParam uintptr) {
ni.mouseDownPublisher.Publish(int(win.GET_X_LPARAM(wParam)), int(win.GET_Y_LPARAM(wParam)), LeftButton)

// We treat keyboard selection of the icon identically to a left-click.
// All three messages use the same format for wParam.
case win.NIN_KEYSELECT, win.NIN_SELECT, win.WM_LBUTTONUP:
// Both messages use the same format for wParam.
case win.NIN_KEYSELECT, win.NIN_SELECT:
if ni.activeContextMenus > 0 {
win.PostMessage(hwnd, win.WM_CANCELMODE, 0, 0)
break
Expand Down Expand Up @@ -232,7 +232,7 @@ func newNotificationIconWindow() (*notifyIconWindow, error) {
ClassName: notifyIconWindowClass,
// 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.

// Always create the window at the origin, thus ensuring that the window
// resides on the desktop's primary monitor, which is the same monitor where
// the taskbar notification area resides. This ensures that the window's
Expand Down Expand Up @@ -820,7 +820,7 @@ func (ni *NotifyIcon) MouseDown() *MouseEvent {
return ni.mouseDownPublisher.Event()
}

// MouseDown returns the event that is published when a mouse button is released
// MouseUp returns the event that is published when a mouse button is released
// while the cursor is over the NotifyIcon.
func (ni *NotifyIcon) MouseUp() *MouseEvent {
return ni.mouseUpPublisher.Event()
Expand Down
Loading