From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KV63g-0008Ip-GC for mharc-grub-devel@gnu.org; Mon, 18 Aug 2008 10:50:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KV63e-0008HO-88 for grub-devel@gnu.org; Mon, 18 Aug 2008 10:50:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KV63c-0008G8-8y for grub-devel@gnu.org; Mon, 18 Aug 2008 10:50:09 -0400 Received: from [199.232.76.173] (port=43559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KV63c-0008Fy-5p for grub-devel@gnu.org; Mon, 18 Aug 2008 10:50:08 -0400 Received: from aybabtu.com ([69.60.117.155]:37360) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KV63b-00053h-IJ for grub-devel@gnu.org; Mon, 18 Aug 2008 10:50:07 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KV5uw-0002dp-CK for grub-devel@gnu.org; Mon, 18 Aug 2008 16:41:10 +0200 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1KV62F-0007gW-J1 for grub-devel@gnu.org; Mon, 18 Aug 2008 16:48:43 +0200 Date: Mon, 18 Aug 2008 16:48:43 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080818144843.GA29502@thorin> References: <20080724161840.GA24143@thorin> <20080724141331.5d8256b5@gibibit.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <20080724141331.5d8256b5@gibibit.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: gfxterm distinction between fg color and cursor color X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 14:50:10 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 24, 2008 at 02:13:31PM -0700, Colin D Bennett wrote: > On Thu, 24 Jul 2008 18:18:40 +0200 > Robert Millan wrote: > > > Why does gfxterm make a distinction between foreground color and > > cursor color? Do we really want this? > > > > Currently, the variable-based hooks for changing colors have no > > effect in cursor color because of this. > > > > How about supressing separate handling of cursor color, and simply > > use the foreground color to draw it? > > > > Or maybe it'd be better to have setcolor() set cursor color > > implicitly? > > I think it would probably be fine to simply use the foreground color as > the cursor color. Well, it took me a while but I finally got a minute to do this. Here's the patch. -- 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." --azLHFNyN32YCQGCU Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="cursor_color.diff" 2008-08-18 Robert Millan * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove. (struct grub_virtual_screen): Remove `cursor_color'. (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color' initialization. (write_cursor): Use `virtual_screen.fg_color' to draw cursor. Index: term/gfxterm.c =================================================================== --- term/gfxterm.c (revision 1820) +++ term/gfxterm.c (working copy) @@ -42,7 +42,6 @@ #define DEFAULT_STANDARD_COLOR 0x07 #define DEFAULT_NORMAL_COLOR 0x07 #define DEFAULT_HIGHLIGHT_COLOR 0x70 -#define DEFAULT_CURSOR_COLOR 0x07 struct grub_dirty_region { @@ -100,7 +99,6 @@ struct grub_virtual_screen /* Color settings. */ grub_video_color_t fg_color; grub_video_color_t bg_color; - grub_video_color_t cursor_color; /* Text buffer for virtual screen. Contains (columns * rows) number of entries. */ @@ -219,8 +217,6 @@ grub_virtual_screen_setup (unsigned int set_term_color (virtual_screen.term_color); - virtual_screen.cursor_color = grub_video_map_color (DEFAULT_CURSOR_COLOR); - grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY); return grub_errno; @@ -709,7 +705,7 @@ write_cursor (void) width = virtual_screen.char_width; height = 2; - color = virtual_screen.cursor_color; + color = virtual_screen.fg_color; /* Render cursor to text layer. */ grub_video_set_active_render_target (text_layer); --azLHFNyN32YCQGCU--