From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mx.groups.io with SMTP id smtpd.web12.299.1591676692693768489 for ; Mon, 08 Jun 2020 21:24:52 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@marvell.com header.s=pfpt0818 header.b=X1cWctzI; spf=pass (domain: marvell.com, ip: 67.231.156.173, mailfrom: prvs=54298daa36=abdul@marvell.com) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0594KFQo010990 for ; Mon, 8 Jun 2020 21:24:52 -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=hQjXjlVLMh6utIF2zcgARcn89RkYwWQuHnjlpasZHyk=; b=X1cWctzIZhYC7rvdzJfIp6oJjkbhM3z+i3GVHGBbgAgZC8+00gJoZ8eSdO5EmAEVxU4d Q7nLS23+ebfTdfLMtnwynY3/fTs+m+YVDjcR+L5sA6uFox17MAzAFWwBEMLVTW9oqGLW bHuFQ79W909KfBiG8ontz8yoCGQLEwkQftuTQHqgBQG/KatcTC6CMSq0uooUO9IApGk2 H3CghfRkAvyznyCoADxQ/gnW9iJC0QBICmv2sMHm+3ZFhUjLgONNFCpXASzhqS8qXi2U y2QmJGOcN5kJ5wOd16m09nMc4LwDkO07XTFOrSmrQCbudqwJGMJNV8HkHPMER+W6+7e0 nQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 31gann853g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 08 Jun 2020 21:24:51 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 8 Jun 2020 21:24:50 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 8 Jun 2020 21:24:50 -0700 Received: from DarkNight.caveonetworks.com (unknown [10.109.136.103]) by maili.marvell.com (Postfix) with ESMTP id 1FD453F703F; Mon, 8 Jun 2020 21:24:50 -0700 (PDT) From: "Abdul Lateef Attar" To: CC: Abdul Lateef Attar Subject: [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption. Date: Mon, 8 Jun 2020 21:22:30 -0700 Message-ID: <7018aead66cc281864e78280d3152963fb7ae9df.1591676531.git.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.216,18.0.687 definitions=2020-06-09_01:2020-06-08,2020-06-09 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 Reviewed-by: Dandan Bi --- .../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