Skip to content

Commit

Permalink
Fixed Windows DPI scaling issue, hopefully. I haven't been able to re…
Browse files Browse the repository at this point in the history
…produce the issue, but the suggested fix doesn't seem to break anything.
  • Loading branch information
asweigart committed Mar 19, 2017
1 parent fe22305 commit 9cd04d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Harrison https://github.com/Sentdex
Hugo Salvador https://github.com/hugoesb
jakibaki https://github.com/
Jeremy R. Gray https://github.com/jeremygray
Jon Winsley https://github.com/glitchassassin
Jose Riha https://github.com/jose1711
Korons https://github.com/Korons
lb1a https://github.com/lb1a
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v0.9.35, 2017/03/19 -- Fixed Windows DPI scaling issue.
v0.9.34, 2017/03/18 -- Fixed several bugs after the Sentry OSS sprint, including Windows permission errors.
v0.9.33, 2016/01/08 -- Fixed bug with missing keyword arg in hotkey(). Thanks jmcduffie!
v0.9.32, 2015/10/28 -- Updated setup.py to pull info from source
v0.9.31, 2015/09/06 -- Incorporated many fixes and changes from Denilson Figueiredo de Sá. Thanks!
Expand Down
2 changes: 1 addition & 1 deletion pyautogui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from __future__ import absolute_import, division, print_function


__version__ = '0.9.33'
__version__ = '0.9.35'

import collections
import sys
Expand Down
5 changes: 5 additions & 0 deletions pyautogui/_pyautogui_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
if sys.platform != 'win32':
raise Exception('The pyautogui_win module should only be loaded on a Windows system.')


# Fixes the scaling issues where PyAutoGUI was reporting the wrong resolution:
ctypes.windll.user32.SetProcessDPIAware()

This comment has been minimized.

Copy link
@10-5

10-5 Apr 20, 2017

Contributor

Causing AttributeError: function 'SetProcessDPIAware' not found on Windows XP. I sent a pull request (#147) to fix this.



"""
A lot of this code is probably repeated from win32 extensions module, but I didn't want to have that dependency.
Expand Down

0 comments on commit 9cd04d3

Please sign in to comment.