From 80cfa2ee9c79b6c3b57a5d81bf998d2d9fb397e8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Feb 2014 16:13:23 +0530 Subject: [PATCH] ... --- src/calibre/gui2/viewer/gestures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/viewer/gestures.py b/src/calibre/gui2/viewer/gestures.py index e0e941b54f..37e13c5986 100644 --- a/src/calibre/gui2/viewer/gestures.py +++ b/src/calibre/gui2/viewer/gestures.py @@ -163,12 +163,12 @@ class GestureHandler(QObject): # events. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms703320(v=vs.85).aspx self.is_fake_mouse_event = lambda : False if touch_supported and iswindows: - LPARAM = ctypes.c_long if ctypes.sizeof(ctypes.c_long) == ctypes.sizeof(ctypes.c_void_p) else ctypes.c_longlong + from ctypes import wintypes MI_WP_SIGNATURE = 0xFF515700 SIGNATURE_MASK = 0xFFFFFF00 try: f = ctypes.windll.user32.GetMessageExtraInfo - f.restype = LPARAM + f.restype = wintypes.LPARAM def is_fake_mouse_event(): val = f() ans = (val & SIGNATURE_MASK) == MI_WP_SIGNATURE