shithub: slug

Download patch

ref: 6e8d03dbe4e3f84c5aff74e8f72c8bd69e06009e
parent: bb6cf18bf2918149d80e8649a046bb2255c0afc8
author: phil9 <telephil9@gmail.com>
date: Thu Dec 1 00:12:04 EST 2022

recreate canvas image when changing size

--- a/api.c
+++ b/api.c
@@ -45,6 +45,8 @@
 		return 0;
 	width = w;
 	height = h;
+	freeimage(canvas);
+	canvas = allocimage(display, Rect(0, 0, w, h), screen->chan, 0, DNofill);
 	resize(L, w, h);
 	return 0;
 }