From 4a12514f0bc960ee63fe6a72f8621964c2b90a0c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 28 Sep 2016 09:14:16 +0530 Subject: [PATCH] Have a two finger tap also bring up the chrome --- src/pyj/read_book/touch.pyj | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pyj/read_book/touch.pyj b/src/pyj/read_book/touch.pyj index 214d011b8c..3e0155e0b4 100644 --- a/src/pyj/read_book/touch.pyj +++ b/src/pyj/read_book/touch.pyj @@ -250,12 +250,13 @@ class BookTouchHandler(TouchHandler): if gesture.type is 'double-tap': if gesture.active: return + gesture.type = 'show-chrome' get_boss().handle_gesture(gesture) -touch_handler = BookTouchHandler() +main_touch_handler = BookTouchHandler() def create_handlers(): - window.addEventListener('touchstart', touch_handler.handle_touchstart, True) - window.addEventListener('touchmove', touch_handler.handle_touchmove, True) - window.addEventListener('touchend', touch_handler.handle_touchend, True) - window.addEventListener('touchcancel', touch_handler.handle_touchcancel, True) + window.addEventListener('touchstart', main_touch_handler.handle_touchstart, True) + window.addEventListener('touchmove', main_touch_handler.handle_touchmove, True) + window.addEventListener('touchend', main_touch_handler.handle_touchend, True) + window.addEventListener('touchcancel', main_touch_handler.handle_touchcancel, True)