Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more focus event issue after reloading appModules #17322

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions source/virtualBuffers/MSHTML.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A part of NonVisual Desktop Access (NVDA)
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2009-2023 NV Access Limited, Babbage B.V., Accessolutions, Julien Cochuyt, Cyrille Bougot
# Copyright (C) 2009-2024 NV Access Limited, Babbage B.V., Accessolutions, Julien Cochuyt, Cyrille Bougot

from comtypes import COMError
from . import VirtualBuffer, VirtualBufferTextInfo, VBufStorage_findMatch_word, VBufStorage_findMatch_notEmpty
Expand Down Expand Up @@ -283,9 +283,13 @@ def _get_isAlive(self):
return False
if not winUser.isWindow(root.windowHandle):
return False
if root.appModule.appName.startswith("wwahost") and not winUser.isDescendantWindow(
winUser.getForegroundWindow(),
root.windowHandle,
if (
root.appModule
and root.appModule.appName.startswith("wwahost")
and not winUser.isDescendantWindow(
winUser.getForegroundWindow(),
root.windowHandle,
)
):
# #4572: When a wwahost hosted app is in the background it gets suspended and all COM calls freeze.
# Therefore we don't have enough info to say whether its dead or not. We assume it is alive until we can get a better answer.
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ To use this feature, "allow NVDA to control the volume of other applications" mu
* After reporting a normalized character, NVDA no longer incorrectly reports subsequent characters as normalized. (#17286, @LeonarddeR)
* Composite characters (such as é) are now reported correctly. (#17295, @LeonarddeR)
* In Word or Outlook, when using legacy object model, the command to report the destination URL of a link does not report any longer "Not a link" when there is one to report. (#17292, @CyrilleB79)
* If the plugins are reloaded while a browseable message is opened, NVDA will no longer fail to report subsequent focus moves. (#17323, @CyrilleB79)

### Changes for Developers

Expand Down