All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bugfix] Characters disappearing in gfxterm
@ 2009-02-07 23:14 phcoder
  2009-02-08  8:47 ` Vesa Jääskeläinen
  0 siblings, 1 reply; 9+ messages in thread
From: phcoder @ 2009-02-07 23:14 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

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

Thanks
Vladimir 'phcoder' Serbinenko

[-- Attachment #2: cursorfix --]
[-- Type: text/plain, Size: 1232 bytes --]

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.  */
@@ -1176,6 +1178,6 @@
 
 GRUB_MOD_FINI(term_gfxterm)
 {
-  grub_unregister_command ("bgimage");
+  grub_unregister_command ("background_image");
   grub_term_unregister_output (&grub_video_term);
 }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1974)
+++ ChangeLog	(working copy)
@@ -1,3 +1,24 @@
+2009-02-07  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Redraw character so it doesn't disappear after cursor moves from it
+
+	* term/gfterm.c (draw_cursor): Redraw character so it 
+	doesn't disappear after cursor moves from it
+	(GRUB_MOD_FINI): correct the name of the command
+
 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
 
 	Fixes problem when running vbetest command as reported by 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm
  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
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Vesa Jääskeläinen @ 2009-02-08  8:47 UTC (permalink / raw)
  To: The development of GRUB 2

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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm
  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-12 19:08   ` [Bugfix] Characters disappearing in gfxterm [fix committed] Colin D Bennett
  2 siblings, 1 reply; 9+ messages in thread
From: BandiPat @ 2009-02-10  2:04 UTC (permalink / raw)
  To: The development of GRUB 2

Vesa Jääskeläinen 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.
> 
> 
> _______________________________________________

Has this fix been committed yet or is there further work to be done to 
clean it up before applying it?

Pat




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm
  2009-02-10  2:04   ` BandiPat
@ 2009-02-10 16:12     ` Vesa Jääskeläinen
  0 siblings, 0 replies; 9+ messages in thread
From: Vesa Jääskeläinen @ 2009-02-10 16:12 UTC (permalink / raw)
  To: The development of GRUB 2

BandiPat wrote:
> Vesa Jääskeläinen 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:

>>
>> It is not designed to work in there. I think modifying this needs
>> logical level approach and not ad hoc fix.
>>
> 
> Has this fix been committed yet or is there further work to be done to
> clean it up before applying it?

It has not been committed. Nor do I have had chance to personally to
look at it.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm
  2009-02-08  8:47 ` Vesa Jääskeläinen
  2009-02-10  2:04   ` BandiPat
@ 2009-03-11 14:36   ` BandiPat
  2009-03-11 21:10     ` Robert Millan
  2009-03-12 19:08   ` [Bugfix] Characters disappearing in gfxterm [fix committed] Colin D Bennett
  2 siblings, 1 reply; 9+ messages in thread
From: BandiPat @ 2009-03-11 14:36 UTC (permalink / raw)
  To: GRUB 2

Vesa Jääskeläinen 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.
=====================

Has there been any further work done on the disappearing characters in 
gfxterm?  I know you guys had looked at it, but the last word was it was 
not fixed yet.  I understand it's not a priority, but a fix would help 
in me getting the devs for Zenwalk to approve it's use in the next 
release version.

Also, do you intend to release another stable version soon?  As I watch 
the progress of Grub2, I continue to see a good program get even better, 
so using svn is fine for me!  You've added so much since the 1.96 
release though, it just seems another stable release is past due. 
Continue the great work you're doing though, as good software never 
truly gets finished!

Thanks,
Pat


-- 
        ---Zenwalk v6.0--Linux 2.6.28---
         Registered Linux User #225206
"Ever tried Zen computing?"  http://www.zenwalk.org






^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm
  2009-03-11 14:36   ` BandiPat
@ 2009-03-11 21:10     ` Robert Millan
  2009-03-12 13:34       ` BandiPat
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Millan @ 2009-03-11 21:10 UTC (permalink / raw)
  To: The development of GRUB 2

On Wed, Mar 11, 2009 at 10:36:40AM -0400, BandiPat wrote:
>
> Has there been any further work done on the disappearing characters in  
> gfxterm?  I know you guys had looked at it, but the last word was it was  
> not fixed yet.  I understand it's not a priority, but a fix would help  
> in me getting the devs for Zenwalk to approve it's use in the next  
> release version.
>
> Also, do you intend to release another stable version soon?  As I watch  
> the progress of Grub2, I continue to see a good program get even better,  
> so using svn is fine for me!  You've added so much since the 1.96  
> release though, it just seems another stable release is past due.  
> Continue the great work you're doing though, as good software never  
> truly gets finished!

Perhaps you could help by doing a regression check and telling us which
commit introduced this problem?

(there's a "svn-bisect" program in subversion-tools you can use)

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm
  2009-03-11 21:10     ` Robert Millan
@ 2009-03-12 13:34       ` BandiPat
  0 siblings, 0 replies; 9+ messages in thread
From: BandiPat @ 2009-03-12 13:34 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan wrote:
> On Wed, Mar 11, 2009 at 10:36:40AM -0400, BandiPat wrote:
>> Has there been any further work done on the disappearing characters in  
>> gfxterm?  I know you guys had looked at it, but the last word was it was  
>> not fixed yet.  I understand it's not a priority, but a fix would help  
>> in me getting the devs for Zenwalk to approve it's use in the next  
>> release version.
>>
>> Also, do you intend to release another stable version soon?  As I watch  
>> the progress of Grub2, I continue to see a good program get even better,  
>> so using svn is fine for me!  You've added so much since the 1.96  
>> release though, it just seems another stable release is past due.  
>> Continue the great work you're doing though, as good software never  
>> truly gets finished!
> 
> Perhaps you could help by doing a regression check and telling us which
> commit introduced this problem?
> 
> (there's a "svn-bisect" program in subversion-tools you can use)
> 
=======
Robert,
Since this topic was originally brought to the attention of the devs by 
one of the devs, I think I'll leave the "bisecting" to you guys.  I 
believe either Vesa or phcoder found the problem and offered a fix, so 
one of those guys may be able to give you a bit more detail than I could.

Thanks,
Pat


-- 
        ---Zenwalk v6.0--Linux 2.6.28---
         Registered Linux User #225206
"Ever tried Zen computing?"  http://www.zenwalk.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm [fix committed]
  2009-02-08  8:47 ` Vesa Jääskeläinen
  2009-02-10  2:04   ` BandiPat
  2009-03-11 14:36   ` BandiPat
@ 2009-03-12 19:08   ` Colin D Bennett
  2009-03-16  1:27     ` BandiPat
  2 siblings, 1 reply; 9+ messages in thread
From: Colin D Bennett @ 2009-03-12 19:08 UTC (permalink / raw)
  To: The development of GRUB 2

[-- 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 --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bugfix] Characters disappearing in gfxterm [fix committed]
  2009-03-12 19:08   ` [Bugfix] Characters disappearing in gfxterm [fix committed] Colin D Bennett
@ 2009-03-16  1:27     ` BandiPat
  0 siblings, 0 replies; 9+ messages in thread
From: BandiPat @ 2009-03-16  1:27 UTC (permalink / raw)
  To: The development of GRUB 2

Colin D Bennett wrote:
[...]
> 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
> 
> 
> ------------------------------------------------------------------------
Thanks Colin, I just tested this with the latest svn 2031 where it seems 
to be working as you describe.  The cursor is not immediately viewable, 
but upon moving it, appears.  Otherwise it works fine, so thanks for the 
fix.  As you mentioned, I don't know if it's the perfect fix, but it 
does nothing strange and works for making editing easier.

Regards,
Pat

-- 
        ---Zenwalk v6.0--Linux 2.6.28---
         Registered Linux User #225206
"Ever tried Zen computing?"  http://www.zenwalk.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-16  1:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [Bugfix] Characters disappearing in gfxterm [fix committed] Colin D Bennett
2009-03-16  1:27     ` BandiPat

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.