Skip to content

Commit

Permalink
IAccessibleHandler: Windows Live Messenger 2009 exits immediately aft…
Browse files Browse the repository at this point in the history
…er it is started if we send our WM_NULL window alive probe in response to a nameChange event from the MSNHiddenWindowClass window. WM_NULL is supposed ot be ignored by all windows, but it seems that this window is broken. Therefore, use a custom window message instead, which seems to fix this.

Fixes #677.
  • Loading branch information
jcsteh committed Jul 22, 2010
1 parent ea521fd commit c148e98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/IAccessibleHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def normalizeIAccessible(pacc):

def accessibleObjectFromEvent(window,objectID,childID):
wmResult=c_long()
if windll.user32.SendMessageTimeoutW(window,winUser.WM_NULL,0,0,winUser.SMTO_ABORTIFHUNG,2000,byref(wmResult))==0:
if windll.user32.SendMessageTimeoutW(window,wmNVDAPing,0,0,winUser.SMTO_ABORTIFHUNG,2000,byref(wmResult))==0:
log.debugWarning("Window %d dead or not responding: %s" % (window, ctypes.WinError()))
return None
try:
Expand Down Expand Up @@ -797,7 +797,13 @@ def _fakeFocus(oldFocus):
#Register internal object event with IAccessible
cWinEventCallback=WINFUNCTYPE(None,c_int,c_int,c_int,c_int,c_int,c_int,c_int)(winEventCallback)

#: A window message used to determine whether a window is alive.
#: We use this instead of WM_NULL because Windows Live Messenger 2009 (and maybe other applications) barf if we send WM_NULL.
wmNVDAPing = None
def initialize():
global wmNVDAPing
if not wmNVDAPing:
wmNVDAPing = windll.user32.RegisterWindowMessageW(u"NVDA ping")
for eventType in winEventIDsToNVDAEventNames.keys():
hookID=winUser.setWinEventHook(eventType,eventType,0,cWinEventCallback,0,0,0)
if hookID:
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- In Scintilla controls (e.g. Notepad++), text is no longer incorrectly selected when NVDA moves the caret such as during say all. (#746)
- It is again possible to review the contents of cells in MS Excel with the review cursor.
- NVDA can again read by line in certain problematic textArea fields in Internet Explorer 8. (#467)
- Windows Live Messenger 2009 no longer exits immediately after it is started while NVDA is running. (#677)


= 2010.1 =
Expand Down

0 comments on commit c148e98

Please sign in to comment.