From 41c79407b9ec48c14ffc00848c85e89d5e894978 Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 14 Jul 2016 08:53:29 +0800 Subject: [PATCH] diable double tap by default in the widget stack This should fix #2141 and fix #2130. --- frontend/ui/uimanager.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index c5269227c..5c6156eaa 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -186,15 +186,15 @@ function UIManager:close(widget, refreshtype, refreshregion) local dirty = false -- first send close event to widget widget:handleEvent(Event:new("CloseWidget")) - -- make it enabled by default and check any widget that disable it - Input.disable_double_tap = false + -- make it disabled by default and check any widget that enables it + Input.disable_double_tap = true -- then remove all reference to that widget on stack and update for i = #self._window_stack, 1, -1 do if self._window_stack[i].widget == widget then table.remove(self._window_stack, i) dirty = true - elseif self._window_stack[i].widget.disable_double_tap then - Input.disable_double_tap = true + elseif self._window_stack[i].widget.disable_double_tap == false then + Input.disable_double_tap = false end end if dirty then