diff --git a/x/backend.go b/x/backend.go index 3fc3cc5..a73f79d 100644 --- a/x/backend.go +++ b/x/backend.go @@ -126,7 +126,7 @@ func (this *Backend) NewTexture (source image.Image) canvas.TextureCloser { return xcanvas.NewTextureFrom(source) } -func (this *Backend) NewCanvas (bounds image.Rectangle) canvas.Canvas { +func (this *Backend) NewCanvas (bounds image.Rectangle) canvas.CanvasCloser { return xcanvas.NewCanvas(this.x, bounds) } diff --git a/x/canvas/canvas.go b/x/canvas/canvas.go index 748bfe5..8b6a72a 100644 --- a/x/canvas/canvas.go +++ b/x/canvas/canvas.go @@ -49,9 +49,10 @@ func (this *Canvas) Push (window xproto.Window) { } // Close frees this canvas from the X server. -func (this *Canvas) Close () { +func (this *Canvas) Close () error { this.assert() this.Image.Destroy() + return nil } func (this *Canvas) assert () {