Skip to content

Commit

Permalink
Ignore focus events for invisible windows. This stops the annoying re…
Browse files Browse the repository at this point in the history
…port of "pane" when accessing the NVDA menu. This is actually a wx bug, but anyway...
  • Loading branch information
jcsteh committed Mar 5, 2008
1 parent c90c8c7 commit c94b81d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/IAccessibleHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ def focus_winEventCallback(window,objectID,childID,isForegroundChange=False):
#Ignore any events with invalid window handles
if not winUser.isWindow(window):
return
# Ignore focus events on invisible windows.
if not isForegroundChange and not winUser.isWindowVisible(window):
return
foregroundWindow=winUser.getForegroundWindow()
info=winuser.getGUIThreadInfo(winUser.getWindowThreadProcessID(foregroundWindow)[1])
if window!=foregroundWindow and winUser.isDescendantWindow(window,info.hwndFocus) and window!=info.hwndFocus:
Expand Down

0 comments on commit c94b81d

Please sign in to comment.