From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50660: 28.0.50; Text artifacting when the cursor moves over text under mouse face that originally displayed a box Date: Thu, 14 Oct 2021 14:35:42 +0300 Message-ID: <83mtnbltyp.fsf@gnu.org> References: <87czp6ysw7.fsf.ref@yahoo.com> <83ee9j3ju3.fsf@gnu.org> <834kaf3ets.fsf@gnu.org> <8335pz3dli.fsf@gnu.org> <87r1dj4q4m.fsf@yahoo.com> <83zgs71su7.fsf@gnu.org> <87k0jb4k5l.fsf@yahoo.com> <83sfxz1pw0.fsf@gnu.org> <87o88m14g0.fsf@yahoo.com> <83sfxyxeer.fsf@gnu.org> <87h7ee1252.fsf@yahoo.com> <83pmt2xcox.fsf@gnu.org> <87lf3myhlb.fsf@yahoo.com> <87a6jzvnpq.fsf@yahoo.com> <83o88fom1k.fsf@gnu.org> <871r5bvex8.fsf@yahoo.com> <83v92mkzft.fsf@gnu.org> <87k0j0rwo3.fsf@yahoo.com> <838rzbddfa.fsf@gnu.org> <878rzbd1w5.fsf@yahoo.com> <83wnmgkmok.fsf@gnu.org> <878ryvnain.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 50660@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 14 13:37:55 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maz3Z-0009xU-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 13:37:53 +0200 Original-Received: from localhost ([::1]:35580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maz3Y-0004cD-NN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 07:37:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maz2k-0004IB-BW for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 07:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maz2k-0001Bj-2y for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 07:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maz2j-00075r-Pr for bug-gnu-emacs@gnu.org; Thu, 14 Oct 2021 07:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Oct 2021 11:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50660 X-GNU-PR-Package: emacs Original-Received: via spool by 50660-submit@debbugs.gnu.org id=B50660.163421137027201 (code B ref 50660); Thu, 14 Oct 2021 11:37:01 +0000 Original-Received: (at 50660) by debbugs.gnu.org; 14 Oct 2021 11:36:10 +0000 Original-Received: from localhost ([127.0.0.1]:34838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maz1t-00074f-Oa for submit@debbugs.gnu.org; Thu, 14 Oct 2021 07:36:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maz1p-000745-Cn for 50660@debbugs.gnu.org; Thu, 14 Oct 2021 07:36:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43070) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maz1k-0005si-12; Thu, 14 Oct 2021 07:36:00 -0400 Original-Received: from [87.69.77.57] (port=1987 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maz1T-0007eD-TI; Thu, 14 Oct 2021 07:35:59 -0400 In-Reply-To: <878ryvnain.fsf@yahoo.com> (message from Po Lu on Thu, 14 Oct 2021 18:52:48 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217215 Archived-At: > From: Po Lu > Cc: larsi@gnus.org, 50660@debbugs.gnu.org > Date: Thu, 14 Oct 2021 18:52:48 +0800 > > I don't know how to apply the fixes to xterm.c to the other window > systems, so someone who can needs to apply them to the NS and MS-Windows > ports. You just make the same changes there, and ask people with access to those other systems to test it. But see below. > @@ -1799,11 +1799,24 @@ x_draw_glyph_string_foreground (struct glyph_string *s) > { > int i, x; > > + struct face *face_for_box_line = s->face; > + > + if (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w)) > + { > + /* In this situation, the cursor is in the mouse face, but > + s->face hasn't been updated with the mouse face yet. */ > + face_for_box_line = > + FACE_FROM_ID_OR_NULL (s->f, MOUSE_HL_INFO (s->f)->mouse_face_face_id); > + > + if (!face_for_box_line) > + face_for_box_line = FACE_FROM_ID (s->f, MOUSE_FACE_ID); > + } Can't we "fix" this face in xdisp.c, before calling the terminal-specific backend? The bonus will be that we then do it only in one place.