Click icon in tray. Program is restored, icon disappears. VERY IMPORTANT: don't move your mouse after clicking.
Press Win+Alt+Down.
I see the same steps 1-3 in program, but from inside of ShowWindow(hwnd, SW_HIDE); call RefreshWindowInTray is called. Then in line https://github.com/benbuck/rbtray/blob/master/RBTray.cpp#L167 function IsWindowVisible(hwnd) returns TRUE and then RemoveWindowFromTray(hwnd); is called.
To fix the problem we have to hide the program window before AddWindowToTray call.
Normal sequence of events after
Win+Alt+Down
is:and then
ShowWindow(hwnd, SW_HIDE);
in line https://github.com/benbuck/rbtray/blob/master/RBTray.cpp#L113 is called. Everything works correctly.On my two computers after this sequence of steps
Win+Alt+Down
.Win+Alt+Down
.I see the same steps 1-3 in program, but from inside of
ShowWindow(hwnd, SW_HIDE);
callRefreshWindowInTray
is called. Then in line https://github.com/benbuck/rbtray/blob/master/RBTray.cpp#L167 functionIsWindowVisible(hwnd)
returnsTRUE
and thenRemoveWindowFromTray(hwnd);
is called.To fix the problem we have to hide the program window before
AddWindowToTray
call.