Skip to contentSkip to conversation

Characters disappearing in gfxterm

Bugfix phcoder 5 participants 9 messages Feb 7, 2009 – Mar 16, 2009

lore
Share & tools
lore

phcoder

author
#0 lore raw

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

gfxterm.c +3 -1
Index: term/gfxterm.c
===================================================================
@@ -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);
 }
ChangeLog +8 -0
Index: ChangeLog
===================================================================
@@ -1,3 +1,24 @@
+2009-02-07  Vladimir Serbinenko  <[email protected]>
+
+	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  <[email protected]>
 
 	Fixes problem when running vbetest command as reported by 
#1 lore raw
Quoted 3 lines · phcoder

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:

gfxterm.c line 751

Quoted 13 lines

Index: term/gfxterm.c
===================================================================

gfxterm.c +2 -0
@@ -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.

#2 lore raw
Quoted 19 lines · Vesa Jääskeläinen
Quoted 3 lines · phcoder

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:

Quoted 12 lines

Index: term/gfxterm.c
===================================================================

gfxterm.c +2 -0
@@ -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);
 
Quoted 7 lines

gfxterm.c line 751

Quoted 1 line
gfxterm.c +0 -0
   /* 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

#3 lore raw
Quoted 9 lines · BandiPat
Quoted 8 lines · Vesa Jääskeläinen
Quoted 3 lines · phcoder

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:

Quoted 6 lines
Quoted 3 lines

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.

#4 lore raw
In reply to Vesa Jääskeläinen
Quoted 19 lines · Vesa Jääskeläinen
Quoted 3 lines · phcoder

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:

Quoted 12 lines

Index: term/gfxterm.c
===================================================================

gfxterm.c +2 -0
@@ -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);
 
Quoted 4 lines

gfxterm.c line 751

Quoted 1 line
gfxterm.c +0 -0
   /* 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

Signature · 3 lines
       ---Zenwalk v6.0--Linux 2.6.28---
        Registered Linux User #225206
"Ever tried Zen computing?"  http://www.zenwalk.org
#5 lore raw
Quoted 7 lines · BandiPat

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.

Quoted 6 lines

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)

Signature · 5 lines
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."
#6 lore raw
Quoted 10 lines · Robert Millan
Quoted 3 lines · BandiPat

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

Signature · 3 lines
       ---Zenwalk v6.0--Linux 2.6.28---
        Registered Linux User #225206
"Ever tried Zen computing?"  http://www.zenwalk.org
#7 lore raw

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

In reply to Vesa Jääskeläinen
Quoted 19 lines · On Sun, 08 Feb 2009 10:47:34 +0200 Vesa Jääskeläinen <[email protected]> wrote:
Quoted 3 lines · phcoder

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:

Quoted 12 lines

Index: term/gfxterm.c
===================================================================

gfxterm.c +2 -0
@@ -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);
 
Quoted 4 lines

gfxterm.c line 751

Quoted 1 line
gfxterm.c +0 -0
   /* 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

#8 lore raw

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

Colin D Bennett wrote:
[...]

Quoted 8 lines

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.

Quoted 5 lines

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

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