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#75291: Redisplay not updating fringe when face filter changes Date: Fri, 03 Jan 2025 22:10:45 +0200 Message-ID: <86wmfbfyka.fsf@gnu.org> References: <874j2h3yzb.fsf@dancol.org> <8634i1jeai.fsf@gnu.org> <87ttah2hcd.fsf@dancol.org> <86v7uxhv9c.fsf@gnu.org> <87ikqx2dwh.fsf@dancol.org> <86h66hhr3a.fsf@gnu.org> <87ldvrajym.fsf@dancol.org> <867c7bheyp.fsf@gnu.org> <87sepz65pv.fsf@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14535"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75291@debbugs.gnu.org, mina86@mina86.com To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 03 21:12:24 2025 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 1tTo1w-0003dN-7r for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jan 2025 21:12:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTo1e-0005ej-4Z; Fri, 03 Jan 2025 15:12:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTo1b-0005di-3R for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:12:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTo1a-0003eR-R1 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:12:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=DkuT0dArQSmK+p2rJvKUS581CS+cCAJKY+/NC/IQjYU=; b=Usq/2R1daZCIKXV42QAIs/jCrwtfB8ZyRvK68pSkCbcA8MgAOMX0/8Oqr8aXFVCztu3jTPTh14pk3Sn50kkgb1e+WURe7DAj7NvTGOMGt642INRNVxD5+OzQ1PuQHn6aMjL4mMNcnubIS7GPXNTMhiLjh/vXHueBnskE+MAiTf2zhmTodenC55ieKdR5jNE/6AvclfyXm+HyEdJPKghBvxd1mjAtiPPXxASZC0xL/yyEWHF68vsySoe2u3ccSJ23va+fcicP/Cd6FEFPHgW3y0ZD4GiXtpR0hnxVFpOgOG4aHMdxFrPWLL2Ff1/NEeDtGf14doREftoicn6Swz1sGg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTo1a-0006bj-KF for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2025 20:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75291 X-GNU-PR-Package: emacs Original-Received: via spool by 75291-submit@debbugs.gnu.org id=B75291.173593507525305 (code B ref 75291); Fri, 03 Jan 2025 20:12:02 +0000 Original-Received: (at 75291) by debbugs.gnu.org; 3 Jan 2025 20:11:15 +0000 Original-Received: from localhost ([127.0.0.1]:52287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTo0p-0006a4-1y for submit@debbugs.gnu.org; Fri, 03 Jan 2025 15:11:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43002) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTo0m-0006Zn-P4 for 75291@debbugs.gnu.org; Fri, 03 Jan 2025 15:11:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTo0e-0003VT-WA; Fri, 03 Jan 2025 15:11:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DkuT0dArQSmK+p2rJvKUS581CS+cCAJKY+/NC/IQjYU=; b=CXUvvuRgAf8t FzuLlp2eP8DKSvcQSP5w25LKYu8tTVpCbyXws3apRCFughu5wF8UAEwi9CEUwuLoMsSuUNiwdS8dp SVi0nSdrCCeZSPuQF/UyR0W06t7yrJTSOh1cM1fNTKMHxIy8m4HRug4t6y9eqFxH9Ric+z4g9wAZl lq9qm5gdy0hXgoWb9xaK5ePZLWezZ5mzi0RDzJfsOni/+z69ojVTWdgm+QKruNvpqF77mindRzCPs qUfnBdR2UdSpdtjs56u19NLvAZWp7jEXDwaVOOYdHPFxZyfPp1XB40963ePhVdQ0y3XbEcbTuboAr ubnRCwksXfTFAqsBONa97A==; In-Reply-To: <87sepz65pv.fsf@dancol.org> (message from Daniel Colascione on Fri, 03 Jan 2025 14:46:20 -0500) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298309 Archived-At: > From: Daniel Colascione > Cc: 75291@debbugs.gnu.org, mina86@mina86.com > Date: Fri, 03 Jan 2025 14:46:20 -0500 > > Eli Zaretskii writes: > > >> From: Daniel Colascione > >> Cc: 75291@debbugs.gnu.org, mina86@mina86.com > >> Date: Fri, 03 Jan 2025 12:25:05 -0500 > >> > >> > I think it depends on whether you use double-buffering (some people > >> > don't or cannot) and whether you have the mouse pointer over an Emacs > >> > frame. Also, depending on the GUI toolkit, the decorations might > >> > flicker. > >> > >> TTY windows don't have fringes, and the most commonly-used window > >> systems all do atomic updates nowadays. > > > > People still report flickering from time to time, so I don't think > > this never happens. > > > >> > So you want to add to display_line code that sets each glyph_row's > >> > redraw_fringe_bitmaps_p flag when the fringe face changes? That could > >> > probably work, provided that we disable redisplay optimizations which > >> > might avoid calling display_line (you will see that we already disable > >> > such optimizations when overlay_arrows_changed_p returns non-zero). > >> > We might actually need to disable more of the optimizations, because > >> > the overlay-arrow thing doesn't contradict the optimizations that > >> > scroll the pixels, something that reaction to changes in the fringe > >> > face cannot tolerate. > >> > >> That might work, but I don't think we even need anything that > >> complicated or low-level. Not many are using :filtered now, and those > >> that do big redraws anyway. How about this simpler code that gets us > >> correctness, albeit more conservatively? > > > > Doesn't that only support face remapping with :filtered attribute? > > What about the more general case where the fringe face is remapped in > > a way that's independent of the windows? > > That seems to work already. It's only in the fringe that I see problems > --- it just doesn't seem worth it to limit the redraw to the fringe. Sorry, I don't understand. I _was_ talking about the fringe face. But if redraw_frame solves the issue, and doesn't cause unpleasant or expensive redraws, feel free to install on the master branch. But please change this: + if (SYMBOLP (parameter) && + WINDOW_LIVE_P (window) && + FRAME_WINDOW_P (WINDOW_XFRAME (w)) && + !NILP (Fget (parameter, Qface_filter)) && <<<<<<<<<<<<<<<<< + !EQ (CDR_SAFE (old_alist_elt), value)) + redraw_frame (WINDOW_XFRAME (w)); to say this instead: + if (SYMBOLP (parameter) && + WINDOW_LIVE_P (window) && + FRAME_WINDOW_P (WINDOW_XFRAME (w)) && + EQ (Fget (parameter, Qface_filter), Qt) && <<<<<<<<<<<<<<<<< + !EQ (CDR_SAFE (old_alist_elt), value)) + redraw_frame (WINDOW_XFRAME (w)); (A stylistic comment: our conventions is to put the && operator at the beginning of a line, not at the end of a line.)