diff --git a/ChangeLog b/ChangeLog index eb4d6b527..bfd84017d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,19 @@ +2012-05-21 Vladimir Serbinenko + + Remove unjustified hard dependency of normal.mod on gfxterm. + + * include/grub/term.h (grub_term_output): New member fullscreen. + * include/grub/gfxterm.h (grub_gfxterm_fullscreen): Removed. + * grub-core/term/gfxterm.c (grub_gfxterm_fullscreen): Make static. + (grub_gfxterm): Set .fullscreen. + * grub-core/normal/menu.c (menu_init): Use fullscreen. + * grub-core/gfxmenu/gfxmenu.c (GRUB_MOD_INIT): Likewise. + 2012-05-21 Vladimir Serbinenko * docs/grub.texi (Internationalisation/Filesystems): Add precisions mentioning possible problems with non-ASCII (non-compliant) ISOs. - MEntion case-insensitive AFFS, SFS and JFS. + Mention case-insensitive AFFS, SFS and JFS. 2012-05-21 Vladimir Serbinenko diff --git a/grub-core/gfxmenu/gfxmenu.c b/grub-core/gfxmenu/gfxmenu.c index 3bd795138..09e86213f 100644 --- a/grub-core/gfxmenu/gfxmenu.c +++ b/grub-core/gfxmenu/gfxmenu.c @@ -121,9 +121,9 @@ GRUB_MOD_INIT (gfxmenu) struct grub_term_output *term; FOR_ACTIVE_TERM_OUTPUTS(term) - if (grub_gfxmenu_try_hook && grub_strcmp (term->name, "gfxterm") == 0) + if (grub_gfxmenu_try_hook && term->fullscreen) { - grub_gfxterm_fullscreen (); + term->fullscreen (); break; } diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index a0ab2297d..7e0a15859 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -349,7 +349,7 @@ menu_init (int entry, grub_menu_t menu, int nested) int gfxmenu = 0; FOR_ACTIVE_TERM_OUTPUTS(term) - if (grub_strcmp (term->name, "gfxterm") == 0) + if (term->fullscreen) { if (grub_env_get ("theme")) { @@ -376,7 +376,7 @@ menu_init (int entry, grub_menu_t menu, int nested) grub_wait_after_message (); } grub_errno = GRUB_ERR_NONE; - grub_gfxterm_fullscreen (); + term->fullscreen (); break; } diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c index 1407109f2..c995b845f 100644 --- a/grub-core/term/gfxterm.c +++ b/grub-core/term/gfxterm.c @@ -313,7 +313,7 @@ grub_gfxterm_set_window (struct grub_video_render_target *target, return grub_errno; } -grub_err_t +static grub_err_t grub_gfxterm_fullscreen (void) { const char *font_name; @@ -1242,6 +1242,7 @@ static struct grub_term_output grub_video_term = .setcolorstate = grub_virtual_screen_setcolorstate, .setcursor = grub_gfxterm_setcursor, .refresh = grub_gfxterm_refresh, + .fullscreen = grub_gfxterm_fullscreen, .flags = GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS, .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR, .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR, diff --git a/include/grub/gfxterm.h b/include/grub/gfxterm.h index 295354baf..3fc8d92d9 100644 --- a/include/grub/gfxterm.h +++ b/include/grub/gfxterm.h @@ -37,8 +37,6 @@ void grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func); void EXPORT_FUNC (grub_gfxterm_schedule_repaint) (void); -grub_err_t EXPORT_FUNC (grub_gfxterm_fullscreen) (void); - extern void (*EXPORT_VAR (grub_gfxterm_decorator_hook)) (void); #endif /* ! GRUB_GFXTERM_HEADER */ diff --git a/include/grub/term.h b/include/grub/term.h index e28279015..bf4dcb463 100644 --- a/include/grub/term.h +++ b/include/grub/term.h @@ -215,6 +215,9 @@ struct grub_term_output /* Update the screen. */ void (*refresh) (struct grub_term_output *term); + /* gfxterm only: put in fullscreen mode. */ + grub_err_t (*fullscreen) (void); + /* The feature flags defined above. */ grub_uint32_t flags;