x-backend #2
@ -100,13 +100,16 @@ func (backend *Backend) Draw () {
|
|||||||
|
|
||||||
if boundsChanged {
|
if boundsChanged {
|
||||||
backend.reallocateCanvas()
|
backend.reallocateCanvas()
|
||||||
|
backend.drawCells(true)
|
||||||
|
backend.canvas.XDraw()
|
||||||
|
backend.canvas.XPaint(backend.window.Id)
|
||||||
|
} else {
|
||||||
|
// backend.drawCells(false)
|
||||||
|
// backend.canvas.XDraw()
|
||||||
|
// backend.canvas.XPaint(backend.window.Id)
|
||||||
|
// FIXME use this instead once it works
|
||||||
|
backend.updateWindowAreas(backend.drawCells(false)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
backend.drawCells(true)
|
|
||||||
backend.canvas.XDraw()
|
|
||||||
backend.canvas.XPaint(backend.window.Id)
|
|
||||||
// FIXME use this instead once it works
|
|
||||||
// backend.updateWindowAreas(...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (backend *Backend) SetTitle (title string) (err error) {
|
func (backend *Backend) SetTitle (title string) (err error) {
|
||||||
@ -251,7 +254,8 @@ func (backend *Backend) drawCells (forceRedraw bool) (areas []image.Rectangle) {
|
|||||||
cell := backend.application.Cell(x, y)
|
cell := backend.application.Cell(x, y)
|
||||||
content := cell.Rune()
|
content := cell.Rune()
|
||||||
if content < 32 { continue }
|
if content < 32 { continue }
|
||||||
|
|
||||||
|
areas = append(areas, backend.boundsOfCell(x, y))
|
||||||
backend.drawRune(x, y, content)
|
backend.drawRune(x, y, content)
|
||||||
}}
|
}}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user