unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: 74876@debbugs.gnu.org
Subject: bug#74876: 31.0.50; Force fringe refresh / force-window-update not affecting fringes
Date: Sat, 14 Dec 2024 20:31:00 +0100	[thread overview]
Message-ID: <7yl87cc0algqh3xvlrywg2z8@mina86.com> (raw)

I’m implementing fringe dimming in non-selected windows as an extension
of the NonGNU ELPA auto-dim-other-buffers package (see
<https://github.com/mina86/auto-dim-other-buffers.el/issues/27>).

<https://github.com/mina86/auto-dim-other-buffers.el/tree/fringes> is
a test code which tries to achieve it.  The expected behaviour is that
after enabling auto-dim-other-buffers-mode defined there, as you switch
between windows, the fringes of non-selected windows will be red.

Alas, it appears that fringes are redrawn lazily such that changing
window does not refresh the fringes.

For a bit more context, the package uses face-remap-add-relative and
:filtered faces, i.e. something like:

    (face-remap-add-relative
     'fringe
     '(:filtered (:window adob--dim t) auto-dim-other-buffers-fringe-face))

I’ve tried toggling fringe-mode when forcing window update with the
below code, but it did not do the trick.

    (defun adob--force-window-update (object)
      (force-window-update object)
      ;; Force fringes to be updated
      (when fringe-mode
        (dolist (wnd (if (windowp object)
                         (list object)
                       (get-buffer-window-list object nil t)))
          (let* ((frame  (window-frame wnd))
                 (params (frame-parameters frame))
                 (left   (alist-get 'left-fringe  params))
                 (right  (alist-get 'right-fringe params)))
            (when (and left right)
              (modify-frame-parameters
               frame '((left-fringe nil) (right-fringe nil)))
              (modify-frame-parameters
               frame `((left-fringe . ,left) (right-fringe . ,right))))))))

I think what I’d like is for force-window-update to force full fringe
redraw?  Honestly, I haven’t yet dug through all of the window and
fringe code so I’m not entirely sure where the main issue lays.





Configured using:
 'configure --prefix=/usr/local --enable-link-time-optimization
 --with-native-compilation=aot --without-dbus --without-gconf
 --without-gpm --without-gsettings --without-pop --without-selinux
 --without-systemd --without-toolkit-scroll-bars --with-x
 --with-x-toolkit=gtk3 --with-xinput2 --with-xml2 --with-tree-sitter
 'CFLAGS=-O2 -mtune=native -march=native -fstack-protector'
 'CPPFLAGS=-O2 -mtune=native -march=native -fstack-protector'
 'CXXFLAGS=-O2 -mtune=native -march=native -fstack-protector''

Configured features:
CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBSYSTEMD LIBXML2
MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS
TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_GB.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  server-mode: t
  form-feed-mode: t
  auto-dim-other-buffers-mode: t
  global-auto-revert-mode: t
  icomplete-mode: t
  global-num3-mode: t
  num3-mode: t
  global-whitespace-mode: t
  whitespace-mode: t
  global-flyspell-mode: t
  remember-notes-mode: t
  delete-selection-mode: t
  windmove-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/mpn/.config/emacs/elpa/transient-20210525.1141/transient hides /usr/local/share/emacs/31.0.50/lisp/transient
~/.config/emacs/custom hides /usr/local/share/emacs/31.0.50/lisp/custom

Features:
(shadow emacsbug sort mail-extr notmuch notmuch-tree notmuch-jump
notmuch-hello notmuch-show notmuch-print notmuch-crypto notmuch-mua
notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address
notmuch-company notmuch-parser format-spec notmuch-wash diff-mode
track-changes coolj goto-addr icalendar notmuch-tag notmuch-lib
notmuch-compat pcase hl-line mm-view mml-smime smime gnutls dig
gnus-alias rot13 message sendmail yank-media puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
cus-edit wid-edit dabbrev checkdoc lisp-mnt shortdoc crm avy misearch
multi-isearch cus-start cus-load pulse color pp cl-print help-fns
radix-tree time-date auto-package-update easy-mmode dash descr-text
server flyspell form-feed init sgml-mode facemenu dom
auto-dim-other-buffers face-remap autorevert filenotify comp comp-cstr
cl-extra help-mode warnings comp-run comp-common rx icomplete num3-mode
disp-table whitespace compile text-property-search comint ansi-osc
ansi-color ring ispell remember advice browse-kill-ring delsel ffap
thingatpt windmove diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs auto-dim-other-buffers-autoloads avy-autoloads
browse-kill-ring-autoloads csv-mode-autoloads evil-autoloads
gnu-elpa-keyring-update-autoloads gnus-alias-autoloads finder-inf
markdown-mode-autoloads notmuch-autoloads protobuf-mode-autoloads
sed-mode-autoloads info vterm-autoloads package browse-url xdg url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads inotify dynamic-setting font-render-setting cairo gtk x-toolkit
xinput2 x multi-tty move-toolbar make-network-process native-compile
emacs)

Memory information:
((conses 16 257215 704427) (symbols 48 34587 67)
 (strings 32 82254 29315) (string-bytes 1 2545384) (vectors 16 34779)
 (vector-slots 8 825430 881688) (floats 8 257 4262)
 (intervals 56 3296 6731) (buffers 992 19))

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»





             reply	other threads:[~2024-12-14 19:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-14 19:31 Michal Nazarewicz [this message]
2024-12-14 20:28 ` bug#74876: 31.0.50; Force fringe refresh / force-window-update not affecting fringes Eli Zaretskii
2024-12-14 21:39   ` Michal Nazarewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7yl87cc0algqh3xvlrywg2z8@mina86.com \
    --to=mina86@mina86.com \
    --cc=74876@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).