Skip to content

Commit afa1ea5

Browse files
bpo-33656: Add enum name for argument of Windows call. (GH-7642)
Change suggested by Eryk Sun in a comment on PR 7137 after it was merged. (cherry picked from commit fd88f31) Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 0404d35 commit afa1ea5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/idlelib/pyshell.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
"Your Python may not be configured for Tk. **", file=sys.__stderr__)
1010
raise SystemExit(1)
1111

12+
# Valid arguments for the ...Awareness call below are defined in the following.
13+
# https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx
1214
if sys.platform == 'win32':
1315
import ctypes
16+
PROCESS_SYSTEM_DPI_AWARE = 1
1417
try:
15-
ctypes.OleDLL('shcore').SetProcessDpiAwareness(1)
18+
ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)
1619
except (AttributeError, OSError):
1720
pass
1821

0 commit comments

Comments
 (0)