From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.bugs Subject: bug#3459: NS: mouse-face flicker Date: Wed, 3 Jun 2009 17:11:25 -0400 Message-ID: <1B4DD692-6A09-4D2A-9DC1-F1E54CEA6A8A@gmail.com> Reply-To: David Reitter , 3459@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1244065063 26434 80.91.229.12 (3 Jun 2009 21:37:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jun 2009 21:37:43 +0000 (UTC) To: 3459@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 03 23:37:36 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MBy9N-0004pS-P6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jun 2009 23:37:34 +0200 Original-Received: from localhost ([127.0.0.1]:50363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBy9N-0000sA-8K for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jun 2009 17:37:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBy9I-0000rP-Ju for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2009 17:37:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBy9D-0000qW-GQ for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2009 17:37:27 -0400 Original-Received: from [199.232.76.173] (port=46232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBy9D-0000qT-BL for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2009 17:37:23 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33495) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MBy9A-0005f7-Dl for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2009 17:37:22 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n53LbIdj018721; Wed, 3 Jun 2009 14:37:18 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n53LK4CN016293; Wed, 3 Jun 2009 14:20:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: David Reitter Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 03 Jun 2009 21:20:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3459 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3459-submit@emacsbugs.donarmstrong.com id=B3459.124406351215596 (code B ref 3459); Wed, 03 Jun 2009 21:20:04 +0000 Original-Received: (at 3459) by emacsbugs.donarmstrong.com; 3 Jun 2009 21:11:52 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.221.178]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n53LBlit015591 for <3459@emacsbugs.donarmstrong.com>; Wed, 3 Jun 2009 14:11:49 -0700 Original-Received: by qyk8 with SMTP id 8so494186qyk.19 for <3459@emacsbugs.donarmstrong.com>; Wed, 03 Jun 2009 14:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=7OVDff966/vTyOs3NvbhY2LKotANkENqVNtjedglhDg=; b=CrSokjR+62/paAP/qHq4SydMwAPkkNb3VPhV7dHURJNU/e59BEJnvof2C5gR3Js5eh QsA/pgtf2pVxEVdK9RrVOcOpxBK+MXI/h9ehuGdrVhDVLBDhlCIFs+XhWKKN8iUGPh00 /3vAj9CrdyY+4RaYQM17XF9Hc73wr2qU5p2q8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=Sbzt5/9H66t3Isfa/ri251YewdfZY/QyUl1p/uLCYzxcFas7NHgernWfJ91xalqQ67 w6nJ/nmcqPTbGkVpu6l7n6vd1Ba4RWXO8bxUer11jhw8tRR5nE4hkMN02JCNdalkA+ZV BuQfRX2AMwXem95dd4W/FAZAxLIcRrW8yxQ80= Original-Received: by 10.224.54.133 with SMTP id q5mr1549431qag.141.1244063489151; Wed, 03 Jun 2009 14:11:29 -0700 (PDT) Original-Received: from SCARLETT.PSY.CMU.EDU (SCARLETT.PSY.CMU.EDU [128.2.249.106]) by mx.google.com with ESMTPS id 7sm49813qwf.35.2009.06.03.14.11.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Jun 2009 14:11:28 -0700 (PDT) X-Mailer: Apple Mail (2.935.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 03 Jun 2009 17:37:27 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28465 Archived-At: 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. */