- Open 4 apps
- launch task manager
- minimize it right away
- invoke CmdTab
- Task manager is NOT on the 2nd place as it should be since it's the most recent app
If you switch back to the task manager and then minimize it, it becomes the 2nd
From rudimentary testing, there is something wrong with event hooks catching window activations - Task Manager is launched as hidden, so your foreground event filters it out as invisible and then there is no tracking for EVENT_OBJECT_SHOW that is triggered after it becomes visible (though not sure how to filter out for just the main window becoming visible, not every control)
Or maybe IsAltTabWindow could be adjusted to NOT filter out invisible windows of specific classes like task manager?
FYI https://github.com/MrBeanCpp/AltTaber seems to be working correctly and placing task manager as 2nd, maybe could check how they do it?
They just ignore invisibility for the purpose of generating a history list
// (actually listening for foreground changes is just for sorting, it doesn't need to be too precise, so you can relax the restrictions). Ignore IsWindowVisible when triggered via EVENT_SYSTEM_FOREGROUND, since the window may not be visible at the moment of creation if (!Util::isWindowAcceptable(hwnd, source == WinEvent)) return;
If you switch back to the task manager and then minimize it, it becomes the 2nd
From rudimentary testing, there is something wrong with event hooks catching window activations - Task Manager is launched as hidden, so your foreground event filters it out as invisible and then there is no tracking for EVENT_OBJECT_SHOW that is triggered after it becomes visible (though not sure how to filter out for just the main window becoming visible, not every control)
Or maybe IsAltTabWindow could be adjusted to NOT filter out invisible windows of specific classes like task manager?
FYI https://github.com/MrBeanCpp/AltTaber seems to be working correctly and placing task manager as 2nd, maybe could check how they do it?
They just ignore invisibility for the purpose of generating a history list