fix saving window settings

we should not save settings from hidden windows.
also should we respect cancellation