Apply resize patch without get/set_window_state().
Apply resize patch with get/set_window_state().