From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ObFeD-0003Di-J6 for mharc-grub-devel@gnu.org; Tue, 20 Jul 2010 12:26:25 -0400 Received: from [140.186.70.92] (port=49808 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObFe9-0002zu-G8 for grub-devel@gnu.org; Tue, 20 Jul 2010 12:26:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObFe6-0001EW-SI for grub-devel@gnu.org; Tue, 20 Jul 2010 12:26:19 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:58398) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObFe6-0001ER-O3 for grub-devel@gnu.org; Tue, 20 Jul 2010 12:26:18 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1ObFe4-0003eW-VO for grub-devel@gnu.org; Tue, 20 Jul 2010 16:26:17 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1ObFe4-00027G-00; Tue, 20 Jul 2010 17:26:16 +0100 Date: Tue, 20 Jul 2010 17:26:16 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20100720162616.GS21862@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH] Disable EFI cursor when switching to another terminal output X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 16:26:23 -0000 On my test hardware, the EFI cursor stays up when switching to gfxterm, which looks pretty odd. We should disable it when the EFI console stops being active. 2010-07-20 Colin Watson Disable EFI cursor when the EFI console becomes inactive. * term/efi/console.c (grub_efi_console_init): New function. (grub_efi_console_fini): New function. (grub_console_term_output): Register init and fini methods. === modified file 'term/efi/console.c' --- term/efi/console.c 2010-05-09 11:20:35 +0000 +++ term/efi/console.c 2010-07-20 15:35:42 +0000 @@ -311,6 +311,20 @@ grub_console_setcursor (struct grub_term efi_call_2 (o->enable_cursor, o, on); } +static grub_err_t +grub_efi_console_init (struct grub_term_output *term) +{ + grub_console_setcursor (term, 1); + return 0; +} + +static grub_err_t +grub_efi_console_fini (struct grub_term_output *term) +{ + grub_console_setcursor (term, 0); + return 0; +} + static struct grub_term_input grub_console_term_input = { .name = "console", @@ -321,6 +335,8 @@ static struct grub_term_input grub_conso static struct grub_term_output grub_console_term_output = { .name = "console", + .init = grub_efi_console_init, + .fini = grub_efi_console_fini, .putchar = grub_console_putchar, .getwh = grub_console_getwh, .getxy = grub_console_getxy, -- Colin Watson [cjwatson@ubuntu.com]