Merge "Add last interacted window check in setInTouchMode" into tm-dev