From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17588: 24.3.91; mouse-face glitchy Date: Wed, 28 May 2014 21:39:45 +0300 Message-ID: <83zji1hhn2.fsf@gnu.org> References: <87lhtpwuh5@ristopher.com> <83a9a5k6dw.fsf@gnu.org> <87ppj1sjz9@ristopher.com> <837g59jmd2.fsf@gnu.org> <874n0dkkdz@ristopher.com> <8361ksk0ug.fsf@gnu.org> <87mwe4cn20@ristopher.com> <83tx8chrkn.fsf@gnu.org> <87egzf7klh@ristopher.com> <83lhtni4xv.fsf@gnu.org> <87sinu2ilw@ristopher.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1401302493 8717 80.91.229.3 (28 May 2014 18:41:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2014 18:41:33 +0000 (UTC) Cc: 17588@debbugs.gnu.org To: Christopher Schmidt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 28 20:41:26 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wpimz-0007wz-My for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 20:41:25 +0200 Original-Received: from localhost ([::1]:44250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpimz-0006Yc-6o for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 14:41:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpimp-0006YS-Kh for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:41:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpime-0006Np-F6 for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:41:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpime-0006Nl-Ba for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:41:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wpimd-00030J-Fj for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:41:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 May 2014 18:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140130241311455 (code B ref -1); Wed, 28 May 2014 18:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2014 18:40:13 +0000 Original-Received: from localhost ([127.0.0.1]:34830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpilk-0002ya-Ls for submit@debbugs.gnu.org; Wed, 28 May 2014 14:40:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32841) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpild-0002xp-Cc for submit@debbugs.gnu.org; Wed, 28 May 2014 14:40:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpilR-0005x3-Gv for submit@debbugs.gnu.org; Wed, 28 May 2014 14:39:56 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpilR-0005wo-Ep for submit@debbugs.gnu.org; Wed, 28 May 2014 14:39:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpilL-0005S4-9l for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:39:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpilF-0005nw-Be for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:39:43 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:49087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpilF-0005lV-3m for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 14:39:37 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N6A00B00RIF0T00@a-mtaout20.012.net.il> for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 21:39:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N6A00AK1RTYZC30@a-mtaout20.012.net.il>; Wed, 28 May 2014 21:39:35 +0300 (IDT) In-reply-to: <87sinu2ilw@ristopher.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89637 Archived-At: > From: Christopher Schmidt > Date: Wed, 28 May 2014 08:27:57 -0400 (EDT) > > (gdb) bt > #0 clear_mouse_face (hlinfo=hlinfo@entry=0x1394780) > at xdisp.c:27495 > #1 0x0000000000457fef in note_mouse_highlight ( > f=f@entry=0x1129898, x=494, y=378) at xdisp.c:28812 ^^^^^ Does this large value of x make sense? AFAIU, you are in the lower window showing the buffer rms2, and you move the mouse above the text in that window. The text lines in that buffer are very short, so I wonder how come you get such a large value of the x coordinate. > #2 0x00000000004b4b86 in note_mouse_movement ( > frame=frame@entry=0x1129898, > event=event@entry=0x7fffffffda70) at xterm.c:3887 > #3 0x00000000004bcb09 in handle_one_xevent ( > dpyinfo=dpyinfo@entry=0x13946e0, > event=event@entry=0x7fffffffda70, > finish=finish@entry=0xb071e0, hold_quit=0x7fffffffdc90) > at xterm.c:6644 > #4 0x00000000004be320 in event_handler_gdk ( > gxev=0x7fffffffda70, ev=, > data=) at xterm.c:5720 > [...] > (gdb) bt > #0 clear_mouse_face (hlinfo=hlinfo@entry=0x1394780) > at xdisp.c:27495 > #1 0x0000000000457fef in note_mouse_highlight (f=0x1129898, > x=62, y=468) at xdisp.c:28812 > #2 0x00000000004b4af1 in XTframe_up_to_date (f=) > at xterm.c:628 OK, so clear_mouse_face calls also come from event_handler_gdk and from XTframe_up_to_date. So are you saying that clear_mouse_face is never called with non-nil hlinfo->mouse_face_window? IOW, if you put a conditional breakpoint in clear_mouse_face, like this: (gdb) break clear_mouse_face if hlinfo->mouse_face_window != Qnil then this breakpoint never breaks, is that right? If so, I'd like to see which code resets mouse_face_window to nil, after it is set by show_mouse_face. (We know that it must be set by show_mouse_face because you do see the highlighting when the mouse is above text with mouse-face.) To this end, set a breakpoint in show_mouse_face, like this: (gdb) break show_mouse_face if draw == DRAW_MOUSE_FACE When this breaks, put a watchpoint on the mouse_face_window field, like this: (gdb) watch -location hlinfo->mouse_face_window (gdb) commands > bt > continue > end (gdb) Then disable or delete the breakpoint in show_mouse_face, and let Emacs run with the "continue" command. You should see the watchpoint trigger when a new line of text is highlighted as result of moving the mouse, in which case mouse_face_window will get a non-nil value. And you should also see the watchpoint trigger in some other place, where mouse_face_window will be reset to nil (whose value in your case seems to be 12026738). This code that resets mouse_face_window to nil is the one we are looking for. Another piece of interesting information is whether this code from note_mouse_highlight: /* Which window is that in? */ window = window_from_coordinates (f, x, y, &part, 1); ever returns a value of 'window' that is not nil? It would be interesting to see the values of x and y at this point when you move the mouse from one line of text to another, and window_from_coordinates returns nil. Thanks.