[AppPref] Properly override the Window property of AppDelegate