EmbeddedPkg/VirtualKeyboard: Avoid notification called more than once

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=996

Issue:
In current code logic, when a key is pressed, it will search
the whole NotifyList to find whether a notification has been
registered with the keystroke. if yes, it will en-queue the
key for notification execution later. And now if different
notification functions have been registered with the same key,
then the key will be en-queued more than once. Then it will
cause the notification executed more than once.

This patch is to enhance the code logic to fix this issue.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Dandan Bi 2018-09-09 22:26:07 +08:00 committed by Eric Dong
parent 52664c5252
commit 9c8e9e76bd
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/** @file
VirtualKeyboard driver
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
This program and the accompanying materials
@ -1045,6 +1045,7 @@ VirtualKeyboardTimerHandler (
//
Enqueue (&VirtualKeyboardPrivate->QueueForNotify, &KeyData);
gBS->SignalEvent (VirtualKeyboardPrivate->KeyNotifyProcessEvent);
break;
}
}