diff options
Diffstat (limited to 'osd.lua')
| -rw-r--r-- | osd.lua | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -54,6 +54,16 @@ function osd.new(init) return t end +function mt:dirty() + self.is_dirty = true +end + +function mt:flush(state) + if self.is_dirty then + self:redraw(state) + end +end + function mt:resize(w, h) self.width = w self.height = h @@ -63,6 +73,7 @@ end function mt:set_status(msg, level) self.status_msg = msg self.status_level = level + self:dirty() end function mt:status_line() @@ -466,6 +477,8 @@ function mt:redraw(state) else self:clear_img(true) end + + self.is_dirty = false end function mt:toggle_hidden() |
