Fix screen flashing in GUI version Emacs.