From 9c8e9e76bd06014e430ecfa6c8f8e21374005a29 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Sun, 9 Sep 2018 22:26:07 +0800 Subject: 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 Cc: Ard Biesheuvel Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: Ard Biesheuvel Reviewed-by: Ruiyu Ni --- EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'EmbeddedPkg/Drivers') diff --git a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c index 6609bc8dbe..daea9c47d2 100644 --- a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c +++ b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c @@ -1,7 +1,7 @@ /** @file VirtualKeyboard driver -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2018, Linaro Ltd. All rights reserved.
This program and the accompanying materials @@ -1045,6 +1045,7 @@ VirtualKeyboardTimerHandler ( // Enqueue (&VirtualKeyboardPrivate->QueueForNotify, &KeyData); gBS->SignalEvent (VirtualKeyboardPrivate->KeyNotifyProcessEvent); + break; } } -- cgit v1.2.3