Skip to content

Commit

Permalink
Merge pull request #6 from s-h-a-d-o-w/patch-1
Browse files Browse the repository at this point in the history
[win] close menu if user clicks outside
  • Loading branch information
zserge committed Jul 31, 2018
2 parents 89568e8 + 2ae960f commit 8dd1358
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tray.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ static LRESULT CALLBACK _tray_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam,
if (lparam == WM_LBUTTONUP || lparam == WM_RBUTTONUP) {
POINT p;
GetCursorPos(&p);
SetForegroundWindow(hwnd);
WORD cmd = TrackPopupMenu(hmenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON |
TPM_RETURNCMD | TPM_NONOTIFY,
p.x, p.y, 0, hwnd, NULL);
Expand Down

0 comments on commit 8dd1358

Please sign in to comment.