From bd78bad3c7234679177829e8d3e7ca61c1f7f5a8 Mon Sep 17 00:00:00 2001 From: Sigrid Date: Tue, 2 Feb 2021 11:56:45 +0100 Subject: [PATCH 1/2] winwatch: always reflow when possible (thanks telephil9) --- sys/src/cmd/winwatch.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/src/cmd/winwatch.c b/sys/src/cmd/winwatch.c index 988a7cb55..1f88dc541 100644 --- a/sys/src/cmd/winwatch.c +++ b/sys/src/cmd/winwatch.c @@ -185,19 +185,21 @@ drawwin(int i) int geometry(void) { - int i, ncols, z; + int i, nrows, ncols, z; Rectangle r; z = 0; - rows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD); - if(rows <= 0) - rows = 1; - if(rows*cols < nwin || rows*cols >= nwin*2){ - ncols = nwin <= 0 ? 1 : (nwin+rows-1)/rows; - if(ncols != cols){ - cols = ncols; - z = 1; - } + nrows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD); + if(nrows <= 0) + nrows = 1; + if(nrows != rows){ + rows = nrows; + z = 1; + } + ncols = nwin <= 0 ? 1 : (nwin+rows-1)/rows; + if(ncols != cols){ + cols = ncols; + z = 1; } r = Rect(0,0,(Dx(screen->r)-2*MARGIN+PAD)/cols-PAD, font->height); From 3ff21a0e93cd4daa598333c67aff5483b998bb91 Mon Sep 17 00:00:00 2001 From: Sigrid Date: Tue, 2 Feb 2021 12:51:22 +0100 Subject: [PATCH 2/2] fortunes: SATAN --- sys/games/lib/fortunes | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/games/lib/fortunes b/sys/games/lib/fortunes index ea9bc2533..6379f90ef 100644 --- a/sys/games/lib/fortunes +++ b/sys/games/lib/fortunes @@ -5253,3 +5253,4 @@ Open source may not be safe if it has no super excellent moderator. On the Internet, we are all Poland. -- Michael Hayden By the way, BBCNews site makes corrupt the browser. -- Kenji As much as I'd love to I feel I have to let it go -- rminnich +You need a UNIX system to run SATAN.