ufo: add window unloaded state for checking when its no longer needed