An attempt to fix blinking input mode window

This may break something. Don't rely on.