|
|
|
@ -373,29 +373,8 @@ function UIManager:checkTasks()
|
|
|
|
|
return wait_until
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- this is the main loop of the UI controller
|
|
|
|
|
-- it is intended to manage input events and delegate
|
|
|
|
|
-- them to dialogs
|
|
|
|
|
function UIManager:run()
|
|
|
|
|
self._running = true
|
|
|
|
|
while self._running do
|
|
|
|
|
local now = { util.gettime() }
|
|
|
|
|
local wait_until = self:checkTasks()
|
|
|
|
|
|
|
|
|
|
--DEBUG("---------------------------------------------------")
|
|
|
|
|
--DEBUG("exec stack", self._execution_stack)
|
|
|
|
|
--DEBUG("window stack", self._window_stack)
|
|
|
|
|
--DEBUG("dirty stack", self._dirty)
|
|
|
|
|
--DEBUG("---------------------------------------------------")
|
|
|
|
|
|
|
|
|
|
-- stop when we have no window to show
|
|
|
|
|
if #self._window_stack == 0 then
|
|
|
|
|
DEBUG("no dialog left to show")
|
|
|
|
|
self:quit()
|
|
|
|
|
return nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- repaint dirty widgets
|
|
|
|
|
-- repaint dirty widgets
|
|
|
|
|
function UIManager:repaint()
|
|
|
|
|
local dirty = false
|
|
|
|
|
local request_full_refresh = false
|
|
|
|
|
local force_full_refresh = false
|
|
|
|
@ -490,6 +469,29 @@ function UIManager:run()
|
|
|
|
|
end
|
|
|
|
|
self.update_regions_func = nil
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- this is the main loop of the UI controller
|
|
|
|
|
-- it is intended to manage input events and delegate
|
|
|
|
|
-- them to dialogs
|
|
|
|
|
function UIManager:run()
|
|
|
|
|
self._running = true
|
|
|
|
|
while self._running do
|
|
|
|
|
local now = { util.gettime() }
|
|
|
|
|
local wait_until = self:checkTasks()
|
|
|
|
|
|
|
|
|
|
--DEBUG("---------------------------------------------------")
|
|
|
|
|
--DEBUG("exec stack", self._execution_stack)
|
|
|
|
|
--DEBUG("window stack", self._window_stack)
|
|
|
|
|
--DEBUG("dirty stack", self._dirty)
|
|
|
|
|
--DEBUG("---------------------------------------------------")
|
|
|
|
|
|
|
|
|
|
-- stop when we have no window to show
|
|
|
|
|
if #self._window_stack == 0 then
|
|
|
|
|
DEBUG("no dialog left to show")
|
|
|
|
|
self:quit()
|
|
|
|
|
return nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
self:checkTasks()
|
|
|
|
|
|
|
|
|
|