Unverified Commit 8dd1358b authored by Serge Zaitsev's avatar Serge Zaitsev Committed by GitHub

Merge pull request #6 from s-h-a-d-o-w/patch-1

[win] close menu if user clicks outside
parents 89568e80 2ae960fc
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment