can set whether the window is key window and fix the top level issue