input: Recognize mouse events for abstract_ui

This commit is contained in:
Thiago de Arruda
2014-12-09 14:12:12 -03:00
parent b11ada1aba
commit 40977e78a2
4 changed files with 264 additions and 20 deletions

View File

@@ -147,17 +147,21 @@ function Screen:expect(expected, attr_ids)
end
function Screen:_wait(check, timeout)
local err
local err, checked = false
local function notification_cb(method, args)
assert(method == 'redraw')
self:_redraw(args)
err = check()
checked = true
if not err then
stop()
end
return true
end
run(nil, notification_cb, nil, timeout or 5000)
if not checked then
err = check()
end
if err then
error(err)
end