public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [patch] MdeModulePkg/DisplayEngine: Return the selectable menu correctly
Date: Tue, 22 Nov 2016 08:25:16 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E6622486AA745@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1479784509-57184-1-git-send-email-dandan.bi@intel.com>

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Tuesday, November 22, 2016 11:15 AM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming; Dong, Eric
> Subject: [patch] MdeModulePkg/DisplayEngine: Return the selectable menu correctly
> 
> When returning selectable menu, should return the menu in current form,
> the codes miss to do the check. Now returning the selectable menu behind
> the codes "if ((UINTN) Distance + NextMenuOption->Skip > GapToTop)".
> Then can cover the check, can return the menu correctly.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
> index c2cffec..316e2e3 100644
> --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
> +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
> @@ -1048,25 +1048,28 @@ MoveToNextStatement (
>      //
>      if (NextMenuOption->Row == 0) {
>        UpdateOptionSkipLines (NextMenuOption);
>      }
> 
> -    if (IsSelectable (NextMenuOption)) {
> -      break;
> -    }
> -
>      //
> -    // In this case, still can't find the selectable menu,
> +    // Check whether the menu is beyond current showing form,
>      // return the first one beyond the showing form.
>      //
>      if ((UINTN) Distance + NextMenuOption->Skip > GapToTop) {
>        if (FindInForm) {
>          NextMenuOption = PreMenuOption;
>        }
>        break;
>      }
> 
> +    //
> +    // return the selectable menu in the showing form.
> +    //
> +    if (IsSelectable (NextMenuOption)) {
> +      break;
> +    }
> +
>      Distance += NextMenuOption->Skip;
> 
>      //
>      // Arrive at begin of the menu list.
>      //
> --
> 1.9.5.msysgit.1



      reply	other threads:[~2016-11-22  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22  3:15 [patch] MdeModulePkg/DisplayEngine: Return the selectable menu correctly Dandan Bi
2016-11-22  8:25 ` Dong, Eric [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED077930C258884BBCB450DB737E6622486AA745@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox