Improved tray icon behavior