open window in application thread