From: Colin D Bennett <colin@gibibit.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [Bugfix] Characters disappearing in gfxterm [fix committed]
Date: Thu, 12 Mar 2009 12:08:08 -0700 [thread overview]
Message-ID: <20090312120808.0d099f9c@gibibit.com> (raw)
In-Reply-To: <498E9C26.40407@nic.fi>
[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]
On Sun, 08 Feb 2009 10:47:34 +0200
Vesa Jääskeläinen <chaac@nic.fi> wrote:
> phcoder wrote:
> > Hello. I've run into the bug that when editing menu entry in gfxterm
> > characters disappear after cursor moves away from its position. Here is
> > bugfix
>
> I don't think this is a clean fix:
>
> > Index: term/gfxterm.c
> > ===================================================================
> > --- term/gfxterm.c (revision 1974)
> > +++ term/gfxterm.c (working copy)
> > @@ -744,6 +744,8 @@
> > /* Render cursor to text layer. */
> > grub_video_set_active_render_target (text_layer);
> > grub_video_fill_rect (color, x, y, width, height);
> > + if (! show)
> > + write_char ();
> > grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
> >
> > /* Mark cursor to be redrawn. */
>
> It is not designed to work in there. I think modifying this needs
> logical level approach and not ad hoc fix.
I developed a fix to this, which I committed (rev 2029) after testing
showed it to fix the problem and it didn't seem to cause any
regressions.
It makes sure that the character is redrawn properly, since drawing the
cursor destroys the character if already drawn there.
Vesa, I don't know if you think my fix is any cleaner or less ad hoc
than phcoder's solution since it works in a similar way. I committed
it for now since it seems to me to be an improvement, at least, even if
there is a way for the code to better express its intention than
calling draw_cursor(0) or draw_cursor(1) to re-draw the
current character either with or without the cursor displayed.
There is still one other problem that remains with the cursor on the
menu entry editor, but it seems to be separate: When the menu entry
editor is entered, (hit 'e' on a menu entry), the cursor initially does
not show up. You have to move the cursor to make it show up. However,
it does show up immediately when you enter the GRUB command line (hit
'c'), so I think it may have to do with the menu entry editor's way of
using the terminal--it will need more exploration.
Regards,
Colin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-03-12 19:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-07 23:14 [Bugfix] Characters disappearing in gfxterm phcoder
2009-02-08 8:47 ` Vesa Jääskeläinen
2009-02-10 2:04 ` BandiPat
2009-02-10 16:12 ` Vesa Jääskeläinen
2009-03-11 14:36 ` BandiPat
2009-03-11 21:10 ` Robert Millan
2009-03-12 13:34 ` BandiPat
2009-03-12 19:08 ` Colin D Bennett [this message]
2009-03-16 1:27 ` [Bugfix] Characters disappearing in gfxterm [fix committed] BandiPat
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=20090312120808.0d099f9c@gibibit.com \
--to=colin@gibibit.com \
--cc=grub-devel@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.
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.