Skip to content
Merged
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
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 <tjreedy@udel.edu>
  • Loading branch information
terryjreedy authored and miss-islington committed Jun 11, 2018
commit 4425e83b89bc1714aa538418dc7ad77226572633
5 changes: 4 additions & 1 deletion Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"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

Expand Down