ref: 50917da4d1dda419f22e75b704fbc5d3c2d06cd2
parent: 16fa1b770d30c19f55a6a87c453124eea53d7d8e
author: glenda <glenda@cirno>
date: Sun Mar 23 17:34:31 EDT 2025
disable smooth resizing until i find a better way
--- a/rio.c
+++ b/rio.c
@@ -1020,6 +1020,47 @@
Image*
bandsize(Window *w)
{
+ Rectangle r, or;
+ Point p, startp;
+ int which, owhich, but;
+
+ owhich = -1;
+ or = w->screenr;
+ but = mouse->buttons;
+ startp = onscreen(mouse->xy);
+ drawborder(or, sizecol);
+ while(mouse->buttons == but) {
+ p = onscreen(mouse->xy);
+ which = whichcorner(or, p);
+ if(which != owhich && which != 4 && (owhich|~which) & 1){
+ owhich = which;
+ riosetcursor(corners[which]);
+ }
+ r = whichrect(or, p, owhich);
+ if(!eqrect(r, or) && goodrect(r)){
+ drawborder(r, sizecol);
+ or = r;
+ }
+ readmouse(mousectl);
+ }
+ drawborder(or, nil);
+ if(!goodrect(or))
+ riosetcursor(nil);
+ if(mouse->buttons!=0 || !goodrect(or) || eqrect(or, w->screenr)
+ || abs(p.x-startp.x)+abs(p.y-startp.y) <= 1){
+ flushimage(display, 1);
+ while(mouse->buttons)
+ readmouse(mousectl);
+ return nil;
+ }
+ return allocwindow(wscreen, or, Refbackup, DNofill);
+}
+
+/* TODO: Make this not flicker/cause artifacts */
+/*
+Image*
+bandsize(Window *w)
+{
Rectangle r, or, origr;
Point p, startp;
int which, owhich, but;
@@ -1067,6 +1108,7 @@
return allocwindow(wscreen, r, Refbackup, DNofill);
}
+*/
Window*
pointto(int wait)