diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2018-06-11 19:45:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 19:45:27 (GMT) |
commit | fd88f319a4f40682b989b63f0b6378d69465fda4 (patch) | |
tree | ebfe1c7384138467a0ef78e74264c957fe90b235 /Lib/idlelib | |
parent | 8a05f559ce5064df68c8d4ebd7d4ed28381d9971 (diff) | |
download | cpython-fd88f319a4f40682b989b63f0b6378d69465fda4.zip cpython-fd88f319a4f40682b989b63f0b6378d69465fda4.tar.gz cpython-fd88f319a4f40682b989b63f0b6378d69465fda4.tar.bz2 |
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.
Diffstat (limited to 'Lib/idlelib')
-rwxr-xr-x | Lib/idlelib/pyshell.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index f39f156..ddfb56a 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -9,10 +9,13 @@ except ImportError: "Your Python may not be configured for Tk. **", file=sys.__stderr__) raise SystemExit(1) +# Valid arguments for the ...Awareness call below are defined in the following. +# https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx if sys.platform == 'win32': import ctypes + PROCESS_SYSTEM_DPI_AWARE = 1 try: - ctypes.OleDLL('shcore').SetProcessDpiAwareness(1) + ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE) except (AttributeError, OSError): pass |