function delayed_zoom was geting NoneType when calling view.window()