* [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption.
@ 2020-04-20 7:05 Abdul Lateef Attar
2020-05-07 8:52 ` Dandan Bi
[not found] ` <160CB30545BDC239.3224@groups.io>
0 siblings, 2 replies; 4+ messages in thread
From: Abdul Lateef Attar @ 2020-04-20 7:05 UTC (permalink / raw)
To: devel; +Cc: dandan.bi, eric.dong, jian.j.wang, hao.a.wu, Abdul Lateef Attar
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@marvell.com>
---
| 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
--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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption.
2020-04-20 7:05 [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption Abdul Lateef Attar
@ 2020-05-07 8:52 ` Dandan Bi
[not found] ` <160CB30545BDC239.3224@groups.io>
1 sibling, 0 replies; 4+ messages in thread
From: Dandan Bi @ 2020-05-07 8:52 UTC (permalink / raw)
To: Abdul Lateef Attar, devel@edk2.groups.io
Cc: Dong, Eric, Wang, Jian J, Wu, Hao A
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Thanks,
Dandan
> -----Original Message-----
> From: Abdul Lateef Attar <abdul@marvell.com>
> Sent: Monday, April 20, 2020 3:06 PM
> To: devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;
> Abdul Lateef Attar <abdul@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption.
[not found] ` <160CB30545BDC239.3224@groups.io>
@ 2020-06-08 7:18 ` Dandan Bi
2020-06-10 5:31 ` Dandan Bi
0 siblings, 1 reply; 4+ messages in thread
From: Dandan Bi @ 2020-06-08 7:18 UTC (permalink / raw)
To: devel@edk2.groups.io, Bi, Dandan, Abdul Lateef Attar
Cc: Dong, Eric, Wang, Jian J, Wu, Hao A
Hi All,
I will push the patch tomorrow if don't get any objection.
Thanks,
Dandan
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Dandan
> Bi
> Sent: Thursday, May 7, 2020 4:52 PM
> To: Abdul Lateef Attar <abdul@marvell.com>; devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Wu, Hao A <hao.a.wu@intel.com>
> Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to
> selected BootOption.
>
> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
>
>
> Thanks,
> Dandan
> > -----Original Message-----
> > From: Abdul Lateef Attar <abdul@marvell.com>
> > Sent: Monday, April 20, 2020 3:06 PM
> > To: devel@edk2.groups.io
> > Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric
> > <eric.dong@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A
> > <hao.a.wu@intel.com>; Abdul Lateef Attar <abdul@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@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
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption.
2020-06-08 7:18 ` [edk2-devel] " Dandan Bi
@ 2020-06-10 5:31 ` Dandan Bi
0 siblings, 0 replies; 4+ messages in thread
From: Dandan Bi @ 2020-06-10 5:31 UTC (permalink / raw)
To: devel@edk2.groups.io, Abdul Lateef Attar
Cc: Dong, Eric, Wang, Jian J, Wu, Hao A
This patch is committed via 9b52b06f964226780b7047e10be0c1a65e223eb1
Thanks,
Dandan
> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, June 8, 2020 3:19 PM
> To: devel@edk2.groups.io; Bi, Dandan <dandan.bi@intel.com>; Abdul Lateef
> Attar <abdul@marvell.com>
> Cc: Dong, Eric <eric.dong@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Wu, Hao A <hao.a.wu@intel.com>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to
> selected BootOption.
>
> Hi All,
>
> I will push the patch tomorrow if don't get any objection.
>
>
> Thanks,
> Dandan
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> Dandan
> > Bi
> > Sent: Thursday, May 7, 2020 4:52 PM
> > To: Abdul Lateef Attar <abdul@marvell.com>; devel@edk2.groups.io
> > Cc: Dong, Eric <eric.dong@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Sets the Cursor to
> > selected BootOption.
> >
> > Reviewed-by: Dandan Bi <dandan.bi@intel.com>
> >
> >
> > Thanks,
> > Dandan
> > > -----Original Message-----
> > > From: Abdul Lateef Attar <abdul@marvell.com>
> > > Sent: Monday, April 20, 2020 3:06 PM
> > > To: devel@edk2.groups.io
> > > Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric
> > > <eric.dong@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao
> > > A <hao.a.wu@intel.com>; Abdul Lateef Attar <abdul@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@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 =
> > > + BootMenuData->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
> >
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-10 5:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 7:05 [PATCH] MdeModulePkg: Sets the Cursor to selected BootOption Abdul Lateef Attar
2020-05-07 8:52 ` Dandan Bi
[not found] ` <160CB30545BDC239.3224@groups.io>
2020-06-08 7:18 ` [edk2-devel] " Dandan Bi
2020-06-10 5:31 ` Dandan Bi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox