mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
...
This commit is contained in:
parent
cfcc8c8a87
commit
80cfa2ee9c
@ -163,12 +163,12 @@ class GestureHandler(QObject):
|
|||||||
# events. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms703320(v=vs.85).aspx
|
# events. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms703320(v=vs.85).aspx
|
||||||
self.is_fake_mouse_event = lambda : False
|
self.is_fake_mouse_event = lambda : False
|
||||||
if touch_supported and iswindows:
|
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
|
MI_WP_SIGNATURE = 0xFF515700
|
||||||
SIGNATURE_MASK = 0xFFFFFF00
|
SIGNATURE_MASK = 0xFFFFFF00
|
||||||
try:
|
try:
|
||||||
f = ctypes.windll.user32.GetMessageExtraInfo
|
f = ctypes.windll.user32.GetMessageExtraInfo
|
||||||
f.restype = LPARAM
|
f.restype = wintypes.LPARAM
|
||||||
def is_fake_mouse_event():
|
def is_fake_mouse_event():
|
||||||
val = f()
|
val = f()
|
||||||
ans = (val & SIGNATURE_MASK) == MI_WP_SIGNATURE
|
ans = (val & SIGNATURE_MASK) == MI_WP_SIGNATURE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user