Adjust scanWindows to only register windows that should be managed