Is this really necessary? I don't see any flicker with the current code on master.  Does the change above to where showIME is called introduce flicker that you need to correct for here?