Bug 863680 - Correctly delay the keyboard drawing after app window

resize when the focus is changed. r=timdream