Found a way to make "minimize to tray" functionality to work properly on Windows.