Re: [9fans] Acme resize bug

2018-12-31 Thread Ethan Gardener
On Sun, Dec 30, 2018, at 10:22 PM, Jacob Moody wrote:
> Hello 9fans,
> 
> I've noticed that sometimes when resizing acme columns there is a
> strip left at the bottom that doesn't get redrawn.
> It's a bit hard to notice with the default colours, but changing it up
> makes it more obvious.
> I was able to fix it with this the following patch but am not sure if
> this is the best way to go about fixing it.
> 
> diff -u /dist/clean/plan9front/sys/src/cmd/acme/cols.c 
> /sys/src/cmd/acme/cols.c
> --- /dist/clean/plan9front/sys/src/cmd/acme/cols.c Thu Nov  1 15:02:44 2018
> +++ /sys/src/cmd/acme/cols.c Thu Nov  1 15:38:53 2018
> @@ -204,6 +204,7 @@
>   draw(screen, r2, display->black, nil, ZP);
>   r1.min.y = r2.max.y;
>   r1.min.y = winresize(w, r1, FALSE);
> + draw(screen, r1, textcols[BACK], nil, ZP);
>   }
>   c->r = r;
>  }

That will work, but that strip which doesn't get redrawn is also where Acme 
won't see the mouse as being in any window or tag.  Since it's sometimes useful 
to see it, you might want to draw it in display->back or display->white, I 
guess.  If one of those is already your background color i guess you'll need a 
new global pointer for a new color, or maybe use an existing color which 
happens to be subtly different.  

I'm not posting my code, my brain switches off half-way through finding out how 
to do it, and then I forget what I've done until I want to post it here and 
look it up...



[9fans] Acme resize bug

2018-12-30 Thread Jacob Moody
Hello 9fans,

I've noticed that sometimes when resizing acme columns there is a
strip left at the bottom that doesn't get redrawn.
It's a bit hard to notice with the default colours, but changing it up
makes it more obvious.
I was able to fix it with this the following patch but am not sure if
this is the best way to go about fixing it.

diff -u /dist/clean/plan9front/sys/src/cmd/acme/cols.c /sys/src/cmd/acme/cols.c
--- /dist/clean/plan9front/sys/src/cmd/acme/cols.c Thu Nov  1 15:02:44 2018
+++ /sys/src/cmd/acme/cols.c Thu Nov  1 15:38:53 2018
@@ -204,6 +204,7 @@
  draw(screen, r2, display->black, nil, ZP);
  r1.min.y = r2.max.y;
  r1.min.y = winresize(w, r1, FALSE);
+ draw(screen, r1, textcols[BACK], nil, ZP);
  }
  c->r = r;
 }

Happy New Year,
Moody