grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bugfix] Characters disappearing in gfxterm [fix committed]


From: Colin D Bennett
Subject: Re: [Bugfix] Characters disappearing in gfxterm [fix committed]
Date: Thu, 12 Mar 2009 12:08:08 -0700

On Sun, 08 Feb 2009 10:47:34 +0200
Vesa Jääskeläinen <address@hidden> 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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]