From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#75291: Redisplay not updating fringe when face filter changes Date: Fri, 03 Jan 2025 15:57:37 -0500 Message-ID: <87msg762f2.fsf@dancol.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> <86wmfbfyka.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28280"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.8; emacs 31.0.50 Cc: 75291@debbugs.gnu.org, mina86@mina86.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 03 21:58:20 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 1tTokN-00079g-Gq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jan 2025 21:58:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTok8-0005L8-UD; Fri, 03 Jan 2025 15:58:05 -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 1tTok6-0005Ky-KK for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:58:02 -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 1tTok6-0002Bc-B9 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:58:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=aTZMJXVoJwp3sirHgn4PO4tWa1FmQaLa+3InRXMsvFA=; b=VIzrj1EakDXSe7aWHsfS6uV0MqNdhz39RrQQ5pz6rQM7WajZUGvJA2vFQNdFjl285z/r3P/dZkyEwB6ZKrroA5tnLDRg/+S/NL4YXxilSIk6RD4ssHml9wk1x6+bo+IZpiBVWRu1sfqkLTucVgzQqPEoib7ovwqqTlY5ufiKcDDAfE+P1lQM743QjO5x/REOuBkDNbLyCSXd7+RMmgVR4aGz3aEewMBqLsS83QDaxsbv4/gYAS3SpYduBD6JirRUdK/9LgJM4yx2/F8xIrGWoOKNzyj5ZHYiIm7NnE65tdSXgys5+qR9ZICrR5UhJWT0X48Ik8o7MYfriq/HzpVuHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTok5-0001AO-Uw for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2025 20:58:01 +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.17359378654447 (code B ref 75291); Fri, 03 Jan 2025 20:58:01 +0000 Original-Received: (at 75291) by debbugs.gnu.org; 3 Jan 2025 20:57:45 +0000 Original-Received: from localhost ([127.0.0.1]:52396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTojo-00019e-DU for submit@debbugs.gnu.org; Fri, 03 Jan 2025 15:57:44 -0500 Original-Received: from dancol.org ([2600:3c01:e000:3d8::1]:45560) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTojm-00019U-2i for 75291@debbugs.gnu.org; Fri, 03 Jan 2025 15:57:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=aTZMJXVoJwp3sirHgn4PO4tWa1FmQaLa+3InRXMsvFA=; b=gfT7rn/4m+2J0JGwepEYC1WBM1 uhZveWrl71FxWPfUS8c1rpOrDbVHFwiEp7r0HiFkensYSkoGpX67OpiQCJnOtiyNo5B2OWDlXkHND SAP1h4KGtlbndXU1hjkYTM26JmP8D8XgBhC/3Rr6KYexqDUOKHDHqPEuNt4nXHDe9659f5IPREI2G KLKn2/DpWD9LimZk1nI89M3vIKqqs8TDkLuLUWNS1EIgEXw5uqjZCSPiUiZTyL3dokpETeGyTltU0 dQCs+aJ5txKU4YjKXVSY0tSZgErC8nACjaeOBbrapvm1PyIF9Ak3vKdPsUNxSFnyJ+EagFZQNvyPT iSTX5iJQ==; Original-Received: from 2603-9001-4203-1ab2-f066-27df-9911-13c0.inf6.spectrum.com ([2603:9001:4203:1ab2:f066:27df:9911:13c0]:60688 helo=localhost) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tTojj-0007t5-13; Fri, 03 Jan 2025 15:57:39 -0500 In-Reply-To: <86wmfbfyka.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Jan 2025 22:10:45 +0200") 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:298315 Archived-At: Eli Zaretskii writes: >> 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. I misread your question. To answer it: what are the circumstances in which the effective fringe face can change behind our backs? Any change to a face attribute proper will cause a redraw anyway. The face-remap.el functions call force-mode-line-update to make sure face remapping lists take effect, so we should have non-window-specific remapping changes covered. What's left is the window parameters. Any other cases? > 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.) Thanks for the reminder!