Skip to content

Commit

Permalink
fix int type overflow errors when calling win32 api on 64-bit system
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19925 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 11, 2018
1 parent 6848824 commit 12937c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/xpra/platform/win32/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def GetMonitorInfo(hmonitor):
MonitorFromWindow = user32.MonitorFromWindow
MonitorFromWindow.restype = HMONITOR
GetMonitorInfoW = user32.GetMonitorInfoW
GetMonitorInfoW.argtypes = [HMONITOR, POINTER(MONITORINFOEX)]
GetMonitorInfoW.restype = BOOL
UnhookWindowsHookEx = user32.UnhookWindowsHookEx
CallNextHookEx = user32.CallNextHookEx
SetWindowsHookExA = user32.SetWindowsHookExA
Expand Down Expand Up @@ -406,6 +408,8 @@ def GetMonitorInfo(hmonitor):

#wrap EnumDisplayMonitors to hide the callback function:
MonitorEnumProc = WINFUNCTYPE(BOOL, HMONITOR, HDC, POINTER(RECT), LPARAM)
EnumDisplayMonitors.argtypes = [HDC, POINTER(RECT), MonitorEnumProc, LPARAM]
EnumDisplayMonitors.restype = BOOL
_EnumDisplayMonitors = EnumDisplayMonitors
def EnumDisplayMonitors():
results = []
Expand Down

0 comments on commit 12937c5

Please sign in to comment.