diff --git a/pixelgl/canvas.go b/pixelgl/canvas.go
index 34033c14a072e830b14d72d36671b37bde1b7c74..11f37f5b489202402f582f5836f35f03d901c399 100644
--- a/pixelgl/canvas.go
+++ b/pixelgl/canvas.go
@@ -164,7 +164,9 @@ func (c *Canvas) SetBounds(bounds pixel.Rect) {
 	c.bounds = bounds
 
 	// if this bounds fit into the original bounds, no need to reallocate
-	if c.orig.borders.Contains(bounds.Pos) && c.orig.borders.Contains(bounds.Pos+bounds.Size) {
+	borX, borY, borW, borH := intBounds(c.orig.borders)
+	bndX, bndY, bndW, bndH := intBounds(bounds)
+	if borX <= bndX && bndX+bndW <= borX+borW && borY <= bndY && bndY+bndH <= borY+borH {
 		return
 	}