I tend to stack my rio windows. If you do too you may
enjoy the patch below, which takes some inspiration
from sam and interprets a bad sweep (in practice, a
click instead of a sweep) as a request for dimensions
equal to the those of either the window clicked on or
else the whole screen. You can still cancel a sweep
with b1 or b2. Perhaps there's a cleverer
pseudo-tiling thing that could be hooked in here but
this was good enough for my use.
umbraticus
diff 9126ee3eea90d639f4e877c01400248581d10f65 uncommitted
--- a//sys/src/cmd/rio/rio.c
+++ b//sys/src/cmd/rio/rio.c
@@ -805,6 +805,7 @@
sweep(void)
{
Image *i, *oi;
+ Window *w;
Rectangle r;
Point p0, p;
@@ -837,8 +838,13 @@
}
if(mouse->buttons != 0)
goto Rescue;
- if(i==nil || !goodrect(r))
- goto Rescue;
+ if(i == nil || !goodrect(r)){
+ w = wpointto(p0);
+ r = w == nil ? screen->r : w->screenr;
+ i = allocwindow(wscreen, r, Refnone, DNofill);
+ if(i == nil)
+ goto Rescue;
+ }
oi = i;
i = allocwindow(wscreen, oi->r, Refbackup, DNofill);
freeimage(oi);