From 96e9bb07019273ca2cc9f00c050a771d964d3d8f Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 17 Jan 2015 23:17:46 +0800 Subject: [PATCH] partial refresh screen when koreader goes to forground --- frontend/device/pocketbook/device.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/device/pocketbook/device.lua b/frontend/device/pocketbook/device.lua index e66f67f70..89a38651f 100644 --- a/frontend/device/pocketbook/device.lua +++ b/frontend/device/pocketbook/device.lua @@ -38,7 +38,7 @@ local function yes() return true end local PocketBook = Generic:new{ model = "PocketBook", isPocketBook = yes, - isInBackGroud = false, + isInBackGround = false, } function PocketBook:init() @@ -49,11 +49,13 @@ function PocketBook:init() ev.value = ev.type == EVT_KEYDOWN and 1 or 0 ev.type = 1 -- EV_KEY elseif ev.type == EVT_BACKGROUND then - isInBackGroud = true + isInBackGround = true self:onPowerEvent("Power") - elseif isInBackGroud and ev.type == EVT_FOREGROUND then - isInBackGroud = false + elseif isInBackGround and ev.type == EVT_FOREGROUND then + isInBackGround = false self:onPowerEvent("Power") + elseif not isInBackGround and ev.type == EVT_FOREGROUND then + self.screen:refreshPartial() end end)