Merge "Restore the last IME visiblity of the app window when allowed" into sc-dev