shithub: lola

Download patch

ref: fb7cc13fe8c7e198e6130f973448b13ac8614470
parent: 8e6923021fa4d0a6a69e90fc98230401385e9237
author: aap <aap@papnet.eu>
date: Mon Jul 22 17:08:57 EDT 2024

small fixes

--- a/fs.c
+++ b/fs.c
@@ -396,7 +396,7 @@
 		break;
 
 	case Qwctl:
-		if(wr && rd){
+		if(w && rd){
 			/* can only have one reader of wctl */
 			if(w->wctlopen){
 				respond(r, Einuse);
--- a/wctl.c
+++ b/wctl.c
@@ -152,6 +152,7 @@
 	int n, nt, param, xy, sign;
 	char *f[2], *t;
 
+	cmd.id = 0;
 	cmd.pid = 0;
 	cmd.hidden = FALSE;
 	cmd.scrolling = scrolling;
@@ -265,6 +266,7 @@
 {
 	switch(cmd){
 	case Move:
+		r = rectaddpt(Rect(0,0,Dx(w->img->r),Dy(w->img->r)), r.min);
 		if(!goodrect(r))
 			return Ebadwr;
 		if(!eqpt(r.min, w->img->r.min))
--- a/wind.c
+++ b/wind.c
@@ -117,7 +117,6 @@
 	windows[nwindows++] = w;
 
 	w->mc.c = chancreate(sizeof(Mouse), 16);
-	w->mc.image = w->img;
 
 	w->gone = chancreate(sizeof(int), 0);
 	w->kbd = chancreate(sizeof(char*), 16);