ttk.go
func flush() {
	if focus == nil {
		return
	}
	for y := 0; y < focus.y; y++ {
		for x := 0; x < focus.x; x++ {
			c := focus.getCell(x, y)
			if c == nil {
				// out of range, should not happen
				continue
			}
			if !c.dirty {
				// skip unchanged cells
				continue
			}
			c.dirty = false

			// this shall be the only spot where
			// termbox.SetCell is called!
			termbox.SetCell(x, y, c.Ch, c.Fg, c.Bg)
		}
	}
	_ = termbox.Flush()
}
func flush() {
	if focus == nil {
		return
	}
	for y := 0; y < focus.y; y++ {
		for x := 0; x < focus.x; x++ {
			c := focus.getCell(x, y)
			if c == nil {
				// out of range, should not happen
				continue
			}
			if !c.dirty {
				// skip unchanged cells
				continue
			}
			c.dirty = false

			// this shall be the only spot where
			// termbox.SetCell is called!
			termbox.SetCell(x, y, c.Ch, c.Fg, c.Bg)
		}
	}
	_ = termbox.Flush()
}
// flush copies focused window backing store onto the physical screen.
// flush shall be called from queue context.