From 1b424bb77865a1f059bb539c8e03377fb3dfc2bd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Aug 2017 20:01:37 +0530 Subject: [PATCH] env var to turn off touch just in case my fixes dont work --- src/calibre/gui2/gestures.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/gestures.py b/src/calibre/gui2/gestures.py index 1305ba9410..5070b91a9e 100644 --- a/src/calibre/gui2/gestures.py +++ b/src/calibre/gui2/gestures.py @@ -3,7 +3,7 @@ # License: GPLv3 Copyright: 2017, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals -import sys +import sys, os from functools import partial from PyQt5.Qt import ( @@ -17,6 +17,8 @@ from calibre.utils.monotonic import monotonic touch_supported = False if iswindows and sys.getwindowsversion()[:2] >= (6, 2): # At least windows 7 touch_supported = True +if 'CALIBRE_NO_TOUCH' in os.environ: + touch_supported = False HOLD_THRESHOLD = 1.0 # seconds TAP_THRESHOLD = 50 # manhattan pixels