Subject: bug#3459: NS: mouse-face flicker

From: David Reitter <[email-masked]>
Date: Wed, 3 Jun 2009 12:37:19 -0400

This happens only with the NS port, not on X:

Emacs -Q

(insert (propertize "Hello World" 'mouse-face 'highlight))

Hover mouse over the Hello World text.   Nothing special should happen.

Now select a region with the mouse or the keyboard.

Hover mouse over mouseface text again ==> Heavy flicker; there is a  
visible, sequential removal and redraw of the highlighted text with  
every mouse movement.

Diagnosis:

I'm not sure, hence this report.
One contributing factor is that we ns_flush() in ns_update_end().   
However, this is not just due to nested updates, and just adding  
ns_update calls in note_mouse_highlight alonedoesn't seem to help, at  
least when transient-mark-mode is on.