Skip to content

Commit

Permalink
nvdahelper.py: do not announce int language changes unless the change…
Browse files Browse the repository at this point in the history
… is for the same thread as the focus object.
  • Loading branch information
michaelDCurran committed Sep 5, 2012
1 parent 232959b commit 23382c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/NVDAHelper.py
Expand Up @@ -267,11 +267,15 @@ def nvdaControllerInternal_inputConversionModeUpdate(oldFlags,newFlags,lcid):
@WINFUNCTYPE(c_long,c_long,c_ulong,c_wchar_p)
def nvdaControllerInternal_inputLangChangeNotify(threadID,hkl,layoutString):
global lastInputMethodName, lastInputLanguageName
print "hkl: %s, layoutName: %s"%(hkl,layoutString)
focus=api.getFocusObject()
#This callback can be called before NVDa is fully initialized
#So also handle focus object being None as well as checking for sleepMode
if not focus or focus.sleepMode:
return 0
import NVDAObjects.window
if not isinstance(focus,NVDAObjects.window.Window) or threadID!=focus.windowThreadID:
return 0
import queueHandler
import ui
languageID=hkl&0xffff
Expand Down

0 comments on commit 23382c9

Please sign in to comment.