]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/VirtualKeyboard: Avoid notification called more than once
authorDandan Bi <dandan.bi@intel.com>
Sun, 9 Sep 2018 14:26:07 +0000 (22:26 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 14 Sep 2018 02:18:31 +0000 (10:18 +0800)
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>
EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c

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