ref: a56b64d7b3977676442dfb2d91ae133903808c8c
parent: 63b7a1933e09b8d882b12fe503e8bf3746ca7c21
author: qwx <qwx@sciops.net>
date: Mon Nov 1 21:00:13 EDT 2021
samterm-fullfrontalnudity: check for zero-size windows with small rio windows
--- a/samterm-fullfrontalnudity
+++ b/samterm-fullfrontalnudity
@@ -1,6 +1,6 @@
-diff -Naur a/sys/src/cmd/samterm/flayer.h b/sys/src/cmd/samterm/flayer.h
---- a/sys/src/cmd/samterm/flayer.h Wed Jan 18 01:12:54 2012
-+++ b/sys/src/cmd/samterm/flayer.h Tue Feb 4 05:48:08 2020
+diff ca73f673473457152d6f1b2e9030495f8dec5c49 uncommitted
+--- a/sys/src/cmd/samterm/flayer.h
++++ b/sys/src/cmd/samterm/flayer.h
@@ -42,9 +42,9 @@
void flupfront(Flayer*);
Flayer *flwhich(Point);
@@ -13,10 +13,9 @@
extern Image *maincols[NCOL];
extern Image *cmdcols[NCOL];
-diff -Naur a/sys/src/cmd/samterm/main.c b/sys/src/cmd/samterm/main.c
---- a/sys/src/cmd/samterm/main.c Wed Apr 22 22:51:59 2020
-+++ b/sys/src/cmd/samterm/main.c Fri Feb 21 23:51:07 2020
-@@ -42,7 +42,7 @@
+--- a/sys/src/cmd/samterm/main.c
++++ b/sys/src/cmd/samterm/main.c
+@@ -43,7 +43,7 @@
scratch = alloc(100*RUNESIZE);
nscralloc = 100;
r = screen->r;
@@ -25,7 +24,7 @@
flstart(screen->clipr);
rinit(&cmd.rasp);
flnew(&cmd.l[0], gettext, 1, &cmd);
-@@ -235,30 +235,64 @@
+@@ -240,30 +240,73 @@
getmouse();
}
@@ -77,6 +76,15 @@
}
- return rectclip(rp, screen->r) &&
- rp->max.x-rp->min.x>100 && rp->max.y-rp->min.y>40;
++ /* whee */
++ if(Dx(r) < 3*FLMARGIN){
++ r.min.x = screen->r.min.x;
++ r.max.x = screen->r.max.x;
++ }
++ if(Dy(r) < 3*FLMARGIN){
++ r.min.y = screen->r.min.y;
++ r.max.y = screen->r.max.y;
++ }
+ return r;
+}
+
@@ -111,10 +119,9 @@
}
void
-diff -Naur a/sys/src/cmd/samterm/menu.c b/sys/src/cmd/samterm/menu.c
---- a/sys/src/cmd/samterm/menu.c Wed Jan 18 01:12:54 2012
-+++ b/sys/src/cmd/samterm/menu.c Fri Feb 21 23:51:07 2020
-@@ -127,58 +119,43 @@
+--- a/sys/src/cmd/samterm/menu.c
++++ b/sys/src/cmd/samterm/menu.c
+@@ -127,6 +127,7 @@
int m, i;
Text *t;
@@ -122,6 +129,7 @@
mw = -1;
switch(m = menuhit(3, mousectl, &menu3, nil)){
case -1:
+@@ -133,52 +134,36 @@
break;
case New:
@@ -193,7 +201,7 @@
break;
default:
-@@ -198,30 +175,31 @@
+@@ -198,7 +183,6 @@
}
}
@@ -201,6 +209,7 @@
Text *
sweeptext(int new, int tag)
{
+@@ -205,23 +189,25 @@
Rectangle r;
Text *t;
@@ -241,10 +250,9 @@
}
int
-diff -Naur a/sys/src/cmd/samterm/samterm.h b/sys/src/cmd/samterm/samterm.h
---- a/sys/src/cmd/samterm/samterm.h Wed Apr 22 22:51:59 2020
-+++ b/sys/src/cmd/samterm/samterm.h Fri Feb 21 23:51:07 2020
-@@ -119,7 +119,6 @@
+--- a/sys/src/cmd/samterm/samterm.h
++++ b/sys/src/cmd/samterm/samterm.h
+@@ -118,7 +118,6 @@
int center(Flayer*, long);
int xmenuhit(int, Menu*);
void buttons(int);
@@ -252,7 +260,7 @@
void current(Flayer*);
void duplicate(Flayer*, Rectangle, Font*, int);
void startfile(Text*);
-@@ -163,6 +162,9 @@
+@@ -162,6 +161,9 @@
void dumperrmsg(int, int, int, int);
int screensize(int*,int*);
void getmouse(void);
@@ -262,9 +270,8 @@
#include "mesg.h"
-diff -Naur a/sys/src/cmd/samterm/scroll.c b/sys/src/cmd/samterm/scroll.c
---- a/sys/src/cmd/samterm/scroll.c Wed Apr 22 22:15:05 2020
-+++ b/sys/src/cmd/samterm/scroll.c Tue Feb 4 05:48:08 2020
+--- a/sys/src/cmd/samterm/scroll.c
++++ b/sys/src/cmd/samterm/scroll.c
@@ -111,9 +111,6 @@
int x, y, my, oy, h;
long p0;