Use a static function if a window can be the default focus window, and use such function to return a filtered list of the stack. !669 (cherry picked from commit 2439255f)