Logic fix for icon activation.

Covers all possible cases for icon activation in system tray.