git: 9front

Download patch

ref: 720f5e8b8ac8416d1bb847010a15dac6d84f5ad2
parent: a0445f95cea8ae956b7e1d6b5035bd4b1301fa42
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sun Oct 21 14:27:43 EDT 2012

rio: fix cursor for sizing nocurrent window

wrepaint() used to also set the cursor for the window
if it was current. this reset the corner cursors on
bandresize when one tried to attempt to size a window
that was not current. make repaint just repaint the
window and border. set cursor explicitely for hold
toggle.

--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -660,6 +660,7 @@
 			--w->holding;
 		else
 			w->holding++;
+		wsetcursor(w, 0);
 		wrepaint(w);
 		if(r == Kesc)
 			return;
@@ -732,10 +733,9 @@
 	wsetcols(w);
 	if(!w->mouseopen)
 		frredraw(w);
-	if(w == input){
+	if(w == input)
 		wborder(w, Selborder);
-		wsetcursor(w, 0);
-	}else
+	else
 		wborder(w, Unselborder);
 }
 
@@ -1114,6 +1114,9 @@
 		break;
 	case Holdon:
 	case Holdoff:
+		if(w == input)
+			wsetcursor(w, 0);
+		/* no break */
 	case Repaint:
 		if(w->deleted)
 			break;
--- a/sys/src/cmd/rio/xfid.c
+++ b/sys/src/cmd/rio/xfid.c
@@ -442,13 +442,13 @@
 			break;
 		}
 		if(strncmp(x->data, "holdoff", 7)==0 && w->holding){
-			if(--w->holding == FALSE)
+			if(--w->holding == 0)
 				wsendctlmesg(w, Holdoff, ZR, nil);
 			break;
 		}
 		if(strncmp(x->data, "rawon", 5)==0){
 			if(w->holding){
-				w->holding = FALSE;
+				w->holding = 0;
 				wsendctlmesg(w, Holdoff, ZR, nil);
 			}
 			if(w->rawing++ == 0)
--