Skip to content

Commit 282d875

Browse files
authored
Merge 01d9be5 into 1b68eba
2 parents 1b68eba + 01d9be5 commit 282d875

4 files changed

Lines changed: 25 additions & 4 deletions

File tree

source/visionEnhancementProviders/screenCurtain.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# Copyright (C) 2018-2019 NV Access Limited, Babbage B.V., Leonard de Ruijter
55

66
"""Screen curtain implementation based on the windows magnification API.
7-
This implementation only works on Windows 8 and above.
7+
The Magnification API has been marked by MS as unsupported for WOW64 applications such as NVDA. (#12491)
8+
This module has been tested on Windows versions specified by winVersion.isFullScreenMagnificationAvailable.
89
"""
910

1011
import os
@@ -29,8 +30,9 @@ class MAGCOLOREFFECT(Structure):
2930

3031
# homogeneous matrix for a 4-space transformation (red, green, blue, opacity).
3132
# https://docs.microsoft.com/en-gb/windows/win32/gdiplus/-gdiplus-using-a-color-matrix-to-transform-a-single-color-use
32-
TRANSFORM_BLACK = MAGCOLOREFFECT()
33-
TRANSFORM_BLACK.transform[4][4] = 1.0
33+
TRANSFORM_BLACK = MAGCOLOREFFECT() # empty transformation
34+
TRANSFORM_BLACK.transform[4][4] = 1.0 # retain as an affine transformation
35+
TRANSFORM_BLACK.transform[3][3] = 1.0 # retain opacity, while subtracting other colours (#12491)
3436

3537

3638
def _errCheck(result, func, args):

source/winVersion.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,9 @@ def isUwpOcrAvailable():
217217
}
218218

219219

220-
def isFullScreenMagnificationAvailable():
220+
def isFullScreenMagnificationAvailable() -> bool:
221+
"""
222+
Technically this is always False. The Magnification API has been marked by MS as unsupported for
223+
WOW64 applications such as NVDA. For our usages, support has been added since Windows 8.
224+
"""
221225
return getWinVer() >= WIN8

user_docs/en/changes.t2t

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ What's New in NVDA
55

66
= 2021.2 =
77

8+
== Important notes ==
9+
- Screen Curtain on previous releases of NVDA is no longer compatible with versions of Windows newer than Windows 10 21H2 (10.0.19044).
10+
This includes Windows 10 Insiders and Windows 11.
11+
This is due to a change in the Windows Magnification API.
12+
This release prevents activating screen curtain on untested Windows versions.
13+
When using previous NVDA releases and Windows newer than Windows 10 21H2, screen curtain may fail to work without warning.
14+
To ensure security, confirm that screen curtain works properly with new or experimental versions of Windows.
15+
(#12491, #12684)
16+
-
17+
18+
819
== New Features ==
920
- Support for ARIA annotations:
1021
- adds a command to read a summary of details of an object with aria-details. (#12364)
@@ -39,6 +50,7 @@ This can be toggled in the Preferences dialog or with a new (unassigned) command
3950
- NVDA exits safely when a new process is started. (#12605)
4051
- Reselecting the Handy Tech braille display driver from the Select Braille Display dialog no longer causes errors. (#12618)
4152
- Windows version 10.0.22000 or later is recognized as Windows 11, not Windows 10. (#12626)
53+
- Screen curtain support has been fixed and tested for Windows versions up until 10.0.22000. (#12684)
4254
-
4355

4456

user_docs/en/userGuide.t2t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,9 @@ You can enable the Screen Curtain in the [vision category #VisionSettings] of th
795795

796796
When the screen curtain is active some tasks directly based on what appears on the screen such as performing [OCR #Win10Ocr] or taking a screenshot cannot be achieved.
797797

798+
To ensure security, confirm that the screen curtain works properly with new or experimental versions of Windows.
799+
When using NVDA releases older than 2021.2 and Windows newer than Windows 10 21H2, screen curtain may fail to work without warning.
800+
798801
+ Content Recognition +[ContentRecognition]
799802
When authors don't provide sufficient information for a screen reader user to determine the content of something, various tools can be used to attempt to recognize the content from an image.
800803
NVDA supports the optical character recognition (OCR) functionality built into Windows 10 to recognize text from images.

0 commit comments

Comments
 (0)