From 31639cce3989572013195ee0525ad8cc370fdd14 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 7 Jun 2014 13:36:58 +0800 Subject: [PATCH 1/4] check window stack before sending events This should fix FC on Android with "Start with last opened file" checked --- frontend/ui/uimanager.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index cd5fd409b..931b54bdc 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -116,6 +116,7 @@ end -- transmit an event to registered widgets function UIManager:sendEvent(event) + if #self._window_stack == 0 then return end -- top level widget has first access to the event if self._window_stack[#self._window_stack].widget:handleEvent(event) then return From cb0459c5d14ef3e24c06ab65aeecebd42c0cdce5 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 7 Jun 2014 14:53:47 +0800 Subject: [PATCH 2/4] fix cannot load thrift library on Android --- frontend/apps/reader/pluginloader.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/apps/reader/pluginloader.lua b/frontend/apps/reader/pluginloader.lua index b53b8cc4d..a06fabc0d 100644 --- a/frontend/apps/reader/pluginloader.lua +++ b/frontend/apps/reader/pluginloader.lua @@ -2,7 +2,7 @@ local DEBUG = require("dbg") -- lfs local PluginLoader = { - plugin_path = lfs.currentdir().."/plugins" + plugin_path = "plugins" } function PluginLoader:loadPlugins() From 82347955c4425fc7bc3922a92e24246209255397 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 7 Jun 2014 20:15:43 +0800 Subject: [PATCH 3/4] update luajit-launcher --- android/luajit-launcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/luajit-launcher b/android/luajit-launcher index faf756f04..5bd850e1e 160000 --- a/android/luajit-launcher +++ b/android/luajit-launcher @@ -1 +1 @@ -Subproject commit faf756f04de275994fbcabe2400e4c585cd3f6ae +Subproject commit 5bd850e1e57d4ceb1b867f3bc38a31a8795a9fe9 From 6f99e96e4956389af480cd693c6026d6055f9a7b Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 7 Jun 2014 23:05:13 +0800 Subject: [PATCH 4/4] fix two finger pan gestures detection This is a stupid bug I introduced when I thought 0 evaluated to be false. Actually in Lua only explicit `false` and `nil` are evaluated to `false` all other values are true in logical expressions. This should also fix #546. Probably because the touch screens in Kindle are not as sensitive as in Kobo, this problem is not discovered early util I play with multi-touch on a Android phone which has a sensitive enough screen to expose this bug. --- frontend/ui/gesturedetector.lua | 2 +- koreader-base | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/ui/gesturedetector.lua b/frontend/ui/gesturedetector.lua index 4265796cf..f19c2af10 100644 --- a/frontend/ui/gesturedetector.lua +++ b/frontend/ui/gesturedetector.lua @@ -460,7 +460,7 @@ function GestureDetector:handleTwoFingerPan(tev) -- triggering slot local tslot = tev.slot -- reference slot - local rslot = tslot and 0 or 1 + local rslot = tslot == 1 and 0 or 1 local tpan_dir, tpan_dis = self:getPath(tslot) local tstart_pos = Geom:new{ x = self.first_tevs[tslot].x, diff --git a/koreader-base b/koreader-base index 0047fa7aa..2b38b16d2 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 0047fa7aa34f686641abfa3db7e11217d2315137 +Subproject commit 2b38b16d2795a228b1a541fbc2e09bd093119aad