From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.148.174]) by mx.groups.io with SMTP id smtpd.web12.1301.1587366287723985899 for ; Mon, 20 Apr 2020 00:04:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@marvell.com header.s=pfpt0818 header.b=Od8fR7kE; spf=pass (domain: marvell.com, ip: 67.231.148.174, mailfrom: prvs=337973c400=abdul@marvell.com) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03K71D57004559; Mon, 20 Apr 2020 00:04:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=XDdrxsoMK8nXzkYyWqJfQrZpYzQgIF9YQQi5oV0a0Rw=; b=Od8fR7kEvxqGN6pno0gZBwsXz6voOlkv9PL7Gn4zaDww4/hK2tgESARI53eEc8v2Tc8N SnzocXQzt0WmiQValqjYqX71RDsxbBiyesFuSVuO5Wu16qCVmOYcZcwIdaVEt10zc5s2 Oan+fl0WogpgbnRjvyXmHBRceIsmoavjVwQdT5l4zNj0HG4q/fvOolLMsJqHYJpswk7r HjHoPKowqX+vXVlNz0c/VPDzO4QUIiNIXEOXDX+9bQLeb5j5elDtPZEtfsPrTbzYQ1PR s/ZPvD4x8hfokY2zikQEt38l8cDoqXrKeYlu0LJLbyvBtJQT8fz6ADyCbqnT7bj58pm2 ZA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 30fxwp63yg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 Apr 2020 00:04:47 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Apr 2020 00:04:46 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Apr 2020 00:04:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 20 Apr 2020 00:04:45 -0700 Received: from DarkNight.caveonetworks.com (unknown [10.109.136.103]) by maili.marvell.com (Postfix) with ESMTP id EE52A3F703F; Mon, 20 Apr 2020 00:04:44 -0700 (PDT) From: "Abdul Lateef Attar" To: CC: , , , , Abdul Lateef Attar Subject: [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption. Date: Mon, 20 Apr 2020 00:05:55 -0700 Message-ID: <20200420070555.23046-1-abdul@marvell.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-20_02:2020-04-17,2020-04-20 signatures=0 Content-Type: text/plain Its been observed that in MenuManagerMenuApp when user selects a different BootOption using Up/Down key, the current Cursor position is not chaning. Still points to the old BootOption. This changes first dispalys/redraws the old BootOption followed by new BootOption. Doing so will make current cursor pointing to the user selected BootOption. Signed-off-by: Abdul Lateef Attar --- .../BootManagerMenuApp/BootManagerMenu.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c index 34d4089a55..9e729074ec 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c @@ -451,20 +451,10 @@ BootMenuSelectItem ( } // - // Print want to select item - // - FirstItem = BootMenuData->ScrollBarControl.FirstItem; - gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLACK); - String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem], NULL); - PrintCol = StartCol + 1; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem; - PrintStringAt (PrintCol, PrintRow, String); - FreePool (String); - - // // if Want Select and selected item isn't the same and doesn't re-draw selectable // items, clear select item // + FirstItem = BootMenuData->ScrollBarControl.FirstItem; if (WantSelectItem != BootMenuData->SelectItem && !RePaintItems) { gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLUE); String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[BootMenuData->SelectItem], NULL); @@ -474,6 +464,16 @@ BootMenuSelectItem ( FreePool (String); } + // + // Print want to select item + // + gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLACK); + String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem], NULL); + PrintCol = StartCol + 1; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem; + PrintStringAt (PrintCol, PrintRow, String); + FreePool (String); + gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute); BootMenuData->SelectItem = WantSelectItem; return EFI_SUCCESS; -- 2.11.0