Hacker News new | ask | show | jobs
by dfox 2982 days ago
One notable thing is that in Windows the behavior of taskbar changed around the time of Windows 98SE/2000 (I'm not sure in which version exactly). Originally the "orphaned" tray icons just were there and you could not cause them to go away, "new" behavior is that first event (ie. hover) causes them to be destroyed.
1 comments

Guesswork: once you hover over an icon in the taskbar, later Windows checks if the process (or, rather, window, as the icon will be tied to the window handle you get from CreateWindowEx) handle belonging to it is still alive. If not (aka it cannot find a target window to send the message to) the icon gets destroyed.

ReactOS, another guess here, does either a polling check if all taskbar icons have valid process handles or a check whenever a process exits.

AFAIK the taskbar forwards the window messages destined for the icon to window that owns the icon and in the "new" Windows' behavior simply notices that such window does not exist. ReactOS behavior probably works on the basis of hooking destruction of the owner window (although I suspect that on Windows windows owned by killed process will not get WM_DESTROY message, but it's wild guess as I'm completely out of my rudimentary and rusty knowledge of WinAPI there).