* grub-core/term/gfxterm.c: Add flag "functional" to skip input when

changing windows to avoid crash.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-03 23:32:19 +02:00
parent 17c8bc378f
commit 4fa60739f2
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-10-03 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/term/gfxterm.c: Add flag "functional" to skip input when
changing windows to avoid crash.
2013-10-03 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/arm/cache.c: Add v5 write-through cache support.

View file

@ -97,6 +97,8 @@ struct grub_virtual_screen
struct grub_colored_char *text_buffer;
int total_scroll;
int functional;
};
struct grub_gfxterm_window
@ -178,6 +180,8 @@ clear_char (struct grub_colored_char *c)
static void
grub_virtual_screen_free (void)
{
virtual_screen.functional = 0;
/* If virtual screen has been allocated, free it. */
if (virtual_screen.text_buffer != 0)
{
@ -264,8 +268,12 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y,
virtual_screen.text_buffer[i].code.ncomb = 0;
clear_char (&(virtual_screen.text_buffer[i]));
}
if (grub_errno)
return grub_errno;
virtual_screen.functional = 1;
return GRUB_ERR_NONE;
}
void
@ -814,6 +822,9 @@ static void
grub_gfxterm_putchar (struct grub_term_output *term,
const struct grub_unicode_glyph *c)
{
if (!virtual_screen.functional)
return;
if (c->base == '\a')
/* FIXME */
return;