OSDN Git Service

winConsoleHandler: Don't queue a caret event to NVDA if there is already one pending... release-2011.1beta2
authorJames Teh <jamie@jantrid.net>
Fri, 4 Feb 2011 06:20:12 +0000 (16:20 +1000)
committerJames Teh <jamie@jantrid.net>
Fri, 4 Feb 2011 06:20:12 +0000 (16:20 +1000)
source/winConsoleHandler.py

index b09180c..e1c3df9 100755 (executable)
@@ -106,7 +106,7 @@ def consoleWinEventHook(handle,eventID,window,objectID,childID,threadID,timestam
        #We don't want to do anything with the event if the event is not for the window this console is in\r
        if window!=consoleObject.windowHandle:\r
                return\r
-       if eventID==winUser.EVENT_CONSOLE_CARET:\r
+       if eventID==winUser.EVENT_CONSOLE_CARET and not eventHandler.isPendingEvents("caret",consoleObject):\r
                eventHandler.queueEvent("caret",consoleObject)\r
        # It is safe to call this event from this callback.\r
        # This avoids an extra core cycle.\r