Skip to content

Commit

Permalink
Merge branch 't3625' into next. Incubates #3625
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelDCurran committed Nov 7, 2013
2 parents 41453b3 + 1e03386 commit a1b783b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/appModules/itunes.py
Expand Up @@ -3,6 +3,8 @@
import controlTypes
import oleacc
import winUser
import speech
import treeInterceptorHandler
import api
import eventHandler
import NVDAObjects.IAccessible
Expand Down Expand Up @@ -57,15 +59,16 @@ class WebKitWrapper(NVDAObjects.IAccessible.IAccessible):
presentationType = NVDAObjects.IAccessible.IAccessible.presType_layout

def event_stateChange(self):
from logHandler import log
# iTunes has indicated that a page has died and been replaced by a new one.
focus = api.getFocusObject()
if not winUser.isDescendantWindow(self.windowHandle, focus.windowHandle):
return
if focus.role:
# The old document is still alive.
return
# The new page has the same event params, so we must bypass NVDA's IAccessible caching.
obj = NVDAObjects.IAccessible.getNVDAObjectFromEvent(focus.windowHandle, winUser.OBJID_CLIENT, 0)
if not obj:
return
if focus.treeInterceptor:
speech.cancelSpeech()
treeInterceptorHandler.killTreeInterceptor(focus.treeInterceptor)
eventHandler.queueEvent("gainFocus",obj)

0 comments on commit a1b783b

Please sign in to comment.