[edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption.
Dandan Bi
dandan.bi at intel.com
Mon Jun 8 07:18:53 UTC 2020
Hi All,
I will push the patch tomorrow if don't get any objection.
Thanks,
Dandan
> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Dandan
> Bi
> Sent: Thursday, May 7, 2020 4:52 PM
> To: Abdul Lateef Attar <abdul at marvell.com>; devel at edk2.groups.io
> Cc: Dong, Eric <eric.dong at intel.com>; Wang, Jian J <jian.j.wang at intel.com>;
> Wu, Hao A <hao.a.wu at intel.com>
> Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to
> selected BootOption.
>
> Reviewed-by: Dandan Bi <dandan.bi at intel.com>
>
>
> Thanks,
> Dandan
> > -----Original Message-----
> > From: Abdul Lateef Attar <abdul at marvell.com>
> > Sent: Monday, April 20, 2020 3:06 PM
> > To: devel at edk2.groups.io
> > Cc: Bi, Dandan <dandan.bi at intel.com>; Dong, Eric
> > <eric.dong at intel.com>; Wang, Jian J <jian.j.wang at intel.com>; Wu, Hao A
> > <hao.a.wu at intel.com>; Abdul Lateef Attar <abdul at marvell.com>
> > Subject: [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption.
> >
> > 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 <abdul at marvell.com>
> > ---
> > .../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
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#60852): https://edk2.groups.io/g/devel/message/60852
Mute This Topic: https://groups.io/mt/73146931/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list