From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <gregory@heytings.org>
Cc: larsi@gnus.org, 47832@debbugs.gnu.org
Subject: bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon
Date: Tue, 25 May 2021 15:56:59 +0300 [thread overview]
Message-ID: <835yz7c6p0.fsf@gnu.org> (raw)
In-Reply-To: <e19e2fa8605e23c67df9@heytings.org> (message from Gregory Heytings on Tue, 25 May 2021 12:44:34 +0000)
> Date: Tue, 25 May 2021 12:44:34 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: Lars Ingebrigtsen <larsi@gnus.org>, 47832@debbugs.gnu.org
>
>
> >> diff --git a/src/fringe.c b/src/fringe.c
> >> index 65c9a84..47615f5 100644
> >> --- a/src/fringe.c
> >> +++ b/src/fringe.c
> >> @@ -1776,14 +1776,15 @@ gui_init_fringe (struct redisplay_interface *rif)
> >> for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
> >> {
> >> struct fringe_bitmap *fb = &standard_bitmaps[bt];
> >> - rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
> >> + if (!fringe_bitmaps[bt])
> >> + rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
> >> }
> >>
> >> /* Set up user-defined fringe bitmaps that might have been defined
> >> before the frame of this kind was initialized. This can happen
> >> if Emacs is started as a daemon and the init files define fringe
> >> bitmaps. */
> >> - for ( ; bt < max_used_fringe_bitmap; bt++)
> >> + for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++)
> >> {
> >> struct fringe_bitmap *fb = fringe_bitmaps[bt];
> >> if (fb)
> >
> > Why does the second for-loop go again over the bitmaps that the first
> > one already processed? Or what am I missing?
> >
>
> Each loop processes its "own" bitmaps. In the first loop
> define_fringe_bitmap is called only if (!fringe_bitmaps[bt]), in the
> second loop it is called only if (fringe_bitmaps[bt]). IOW, the first
> loop processes the standard bitmaps that are not overridden by
> user-defined bitmaps, and the second loop processes user-defined bitmaps.
If the standard bitmaps were overridden by user-defined ones, why do
we need to set those overriding user-defined bitmaps once again?
next prev parent reply other threads:[~2021-05-25 12:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 22:22 bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon Gregory Heytings
2021-04-17 6:49 ` Eli Zaretskii
2021-04-17 9:49 ` Gregory Heytings
2021-04-17 10:57 ` Eli Zaretskii
2021-04-17 11:21 ` Eli Zaretskii
2021-04-17 11:32 ` Gregory Heytings
2021-04-17 12:27 ` Eli Zaretskii
2021-04-17 12:52 ` Gregory Heytings
2021-05-25 4:21 ` Lars Ingebrigtsen
2021-05-25 11:55 ` Eli Zaretskii
2021-05-25 12:44 ` Gregory Heytings
2021-05-25 12:56 ` Eli Zaretskii [this message]
2021-05-25 13:03 ` Gregory Heytings
2021-05-25 13:15 ` Eli Zaretskii
2021-05-25 13:24 ` Gregory Heytings
2021-05-25 13:45 ` Eli Zaretskii
2021-05-26 13:27 ` Eli Zaretskii
2021-05-27 7:32 ` Gregory Heytings
2021-05-27 9:35 ` Eli Zaretskii
2021-04-17 11:34 ` Gregory Heytings
2021-04-17 12:28 ` Eli Zaretskii
2021-04-17 11:27 ` Gregory Heytings
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835yz7c6p0.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=47832@debbugs.gnu.org \
--cc=gregory@heytings.org \
--cc=larsi@gnus.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.