From 753a35b52ac098985aff5e22a069d30d16903385 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 6 Dec 2020 15:08:23 +0100 Subject: [PATCH] rio: undo previous commit, was a stupid idea --- sys/src/cmd/rio/dat.h | 1 - sys/src/cmd/rio/data.c | 1 - sys/src/cmd/rio/rio.c | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/src/cmd/rio/dat.h b/sys/src/cmd/rio/dat.h index e18c34b49..edc855595 100644 --- a/sys/src/cmd/rio/dat.h +++ b/sys/src/cmd/rio/dat.h @@ -325,7 +325,6 @@ Image *lightholdcol; Image *paleholdcol; Image *paletextcol; Image *sizecol; -Image *badsizecol; int reverse; /* there are no pastel paints in the dungeons and dragons world -- rob pike */ Window **window; diff --git a/sys/src/cmd/rio/data.c b/sys/src/cmd/rio/data.c index e591255b9..f9b9cfad0 100644 --- a/sys/src/cmd/rio/data.c +++ b/sys/src/cmd/rio/data.c @@ -196,7 +196,6 @@ iconinit(void) paleholdcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DPalegreyblue); paletextcol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF^reverse); sizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DRed); - badsizecol = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x880000FF); if(reverse == 0) holdcol = dholdcol; diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c index f1af15469..f02c278ed 100644 --- a/sys/src/cmd/rio/rio.c +++ b/sys/src/cmd/rio/rio.c @@ -826,7 +826,7 @@ sweep(void) if(i == nil) goto Rescue; oi = i; - border(i, r, Selborder, goodrect(r)?sizecol:badsizecol, ZP); + border(i, r, Selborder, sizecol, ZP); draw(i, insetrect(r, Selborder), cols[BACK], nil, ZP); } } @@ -947,8 +947,8 @@ bandsize(Window *w) riosetcursor(corners[which]); } r = whichrect(or, p, owhich); - if(!eqrect(r, or)){ - drawborder(r, goodrect(r)?sizecol:badsizecol); + if(!eqrect(r, or) && goodrect(r)){ + drawborder(r, sizecol); or = r; } readmouse(mousectl);