From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0208D81E1F for ; Tue, 22 Nov 2016 00:26:10 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 22 Nov 2016 00:26:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,680,1473145200"; d="scan'208";a="789390796" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 22 Nov 2016 00:25:48 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 22 Nov 2016 00:25:46 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.142]) with mapi id 14.03.0248.002; Tue, 22 Nov 2016 16:25:16 +0800 From: "Dong, Eric" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [patch] MdeModulePkg/DisplayEngine: Return the selectable menu correctly Thread-Index: AQHSRG60QNX14FenlUyqok7TCzzNF6Dkqu6w Date: Tue, 22 Nov 2016 08:25:16 +0000 Message-ID: References: <1479784509-57184-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1479784509-57184-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] MdeModulePkg/DisplayEngine: Return the selectable menu correctly X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 08:26:10 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----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 c= orrectly >=20 > 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. >=20 > Cc: Liming Gao > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi > --- > MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeM= odulePkg/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 =3D=3D 0) { > UpdateOptionSkipLines (NextMenuOption); > } >=20 > - 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 =3D PreMenuOption; > } > break; > } >=20 > + // > + // return the selectable menu in the showing form. > + // > + if (IsSelectable (NextMenuOption)) { > + break; > + } > + > Distance +=3D NextMenuOption->Skip; >=20 > // > // Arrive at begin of the menu list. > // > -- > 1.9.5.msysgit.1