shithub: puzzles

Download patch

ref: 2d90f1194071c1aab50331aec255c21c8baf2eb3
parent: 8698b75afca8c60bac6ab8b9f4b93f814497154c
author: sirjofri <sirjofri@sirjofri.de>
date: Fri Jun 7 08:20:19 EDT 2024

fixes clipping

--- a/plan9.c
+++ b/plan9.c
@@ -278,7 +278,8 @@
 p9_clip(void *handle, int x, int y, int w, int h)
 {
 	frontend *fe = (frontend*)handle;
-	screen->clipr = rectaddpt(Rect(x, y, x + w, y + h), fe->ZP);
+	Rectangle r = rectaddpt(Rect(x, y, x + w, y + h), fe->ZP);
+	replclipr(screen, 0, r);
 }
 
 static void
@@ -285,7 +286,7 @@
 p9_unclip(void *handle)
 {
 	USED(handle);
-	screen->clipr = screen->r;
+	replclipr(screen, 0, screen->r);
 }
 
 long drawtime;