diff options
author | root <root@arianrhod.panaceas.james.local> | 2012-11-16 11:52:02 +0000 |
---|---|---|
committer | root <root@arianrhod.panaceas.james.local> | 2012-11-16 11:52:02 +0000 |
commit | a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce (patch) | |
tree | 9a6b9c35465b23ce5871feec5e9ba0c7d5ac7797 /master/debian/gfxterm_background.patch | |
download | grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.tar.gz grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.tar.bz2 grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.zip |
fish
Diffstat (limited to 'master/debian/gfxterm_background.patch')
-rw-r--r-- | master/debian/gfxterm_background.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/master/debian/gfxterm_background.patch b/master/debian/gfxterm_background.patch new file mode 100644 index 0000000..6fa0ff8 --- /dev/null +++ b/master/debian/gfxterm_background.patch @@ -0,0 +1,69 @@ +Description: Fix gfxterm background_color regression +Author: Colin Watson <cjwatson@ubuntu.com> +Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-06/msg00085.html +Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3368 +Last-Update: 2011-06-28 + +Index: b/grub-core/term/gfxterm.c +=================================================================== +--- a/grub-core/term/gfxterm.c ++++ b/grub-core/term/gfxterm.c +@@ -131,6 +131,7 @@ + static unsigned int bitmap_height; + static struct grub_video_bitmap *bitmap; + static int blend_text_bg; ++static grub_video_rgba_color_t default_bg_color = { 0, 0, 0, 0 }; + + static struct grub_dirty_region dirty_region; + +@@ -266,7 +267,8 @@ + + grub_video_set_active_render_target (render_target); + +- virtual_screen.bg_color_display = grub_video_map_rgba(0, 0, 0, 0); ++ virtual_screen.bg_color_display = ++ grub_video_map_rgba_color (default_bg_color); + + /* Clear out text buffer. */ + for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++) +@@ -338,8 +340,8 @@ + double_redraw = mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED + && !(mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP); + +- /* Make sure screen is black. */ +- color = grub_video_map_rgb (0, 0, 0); ++ /* Make sure screen is set to the default background color. */ ++ color = grub_video_map_rgba_color (default_bg_color); + grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height); + if (double_redraw) + { +@@ -1189,7 +1191,6 @@ + grub_gfxterm_background_color_cmd (grub_command_t cmd __attribute__ ((unused)), + int argc, char **args) + { +- grub_video_rgba_color_t color; + struct grub_video_render_target *old_target; + + if (argc != 1) +@@ -1199,7 +1200,7 @@ + if (grub_video_get_info (NULL) != GRUB_ERR_NONE) + return grub_errno; + +- if (grub_video_parse_color (args[0], &color) != GRUB_ERR_NONE) ++ if (grub_video_parse_color (args[0], &default_bg_color) != GRUB_ERR_NONE) + return grub_errno; + + /* Destroy existing background bitmap if loaded. */ +@@ -1216,9 +1217,10 @@ + compatible with the text layer. */ + grub_video_get_active_render_target (&old_target); + grub_video_set_active_render_target (text_layer); +- virtual_screen.bg_color = grub_video_map_rgba_color (color); ++ virtual_screen.bg_color = grub_video_map_rgba_color (default_bg_color); + grub_video_set_active_render_target (old_target); +- virtual_screen.bg_color_display = grub_video_map_rgba_color (color); ++ virtual_screen.bg_color_display = ++ grub_video_map_rgba_color (default_bg_color); + blend_text_bg = 1; + + /* Mark whole screen as dirty. */ |