all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: 3459@emacsbugs.donarmstrong.com
Subject: bug#3459: NS: mouse-face flicker
Date: Wed, 3 Jun 2009 17:11:25 -0400	[thread overview]
Message-ID: <1B4DD692-6A09-4D2A-9DC1-F1E54CEA6A8A@gmail.com> (raw)

Some analysis suggests that the mouse face is generally cleared when t- 
m-m is on, whether really needed or not.  With the patch below (not  
meant as a bug fix) applied, the bug goes away.

Without the patch, try_window_reusing_current_matrix is not used in t- 
m-m with a region visible.
I guess that dpyinfo->mouse_face_window is then set to Qnil, the mouse  
face text cleared and redrawn at a later point in time outside of the  
update_begin/end bracket.

The double-redraws are inefficient, and I don't quite understand why  
they are necessary.

I suspect that this only shows up in NS because the frame is flushed  
every time we have an update_window_end().


Help, please!




diff --git a/src/xdisp.c b/src/xdisp.c
index ac989d3..9db30f8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14162,11 +14162,13 @@ try_window_reusing_current_matrix (w)
      return 0;

    /* Can't do this if region may have changed.  */
+  /*
    if ((!NILP (Vtransient_mark_mode)
         && !NILP (current_buffer->mark_active))
        || !NILP (w->region_showing)
        || !NILP (Vshow_trailing_whitespace))
      return 0;
+  */

    /* If top-line visibility has changed, give up.  */
    if (WINDOW_WANTS_HEADER_LINE_P (w)
@@ -23672,9 +23674,9 @@ note_mouse_highlight (f, x, y)

    /* If we were displaying active text in another window, clear that.
       Also clear if we move out of text area in same window.  */
-  if (! EQ (window, dpyinfo->mouse_face_window)
-      || (part != ON_TEXT && part != ON_MODE_LINE && part !=  
ON_HEADER_LINE
-	  && !NILP (dpyinfo->mouse_face_window)))
+  if ((! EQ (window, dpyinfo->mouse_face_window)
+       || (part != ON_TEXT && part != ON_MODE_LINE && part !=  
ON_HEADER_LINE))
+	  && !NILP (dpyinfo->mouse_face_window))
      clear_mouse_face (dpyinfo);

    /* Not on a window -> return.  */






             reply	other threads:[~2009-06-03 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 21:11 David Reitter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-18 21:42 bug#3459: NS: mouse-face flicker Adrian Robert
2009-09-18 21:51 ` David Reitter
2009-06-03 16:37 David Reitter
2016-01-10 22:45 ` Alan J Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1B4DD692-6A09-4D2A-9DC1-F1E54CEA6A8A@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=3459@emacsbugs.donarmstrong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.