From f725e8b4336ec58db54ae945fc7523bd06ae59a9 Mon Sep 17 00:00:00 2001 From: xfnw Date: Sun, 10 Jul 2022 19:13:13 -0400 Subject: [PATCH] merge ftrv's glitchy background fix --- sys/src/cmd/rio/data.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/rio/data.c b/sys/src/cmd/rio/data.c index f8abd1982..9cc7ae8aa 100644 --- a/sys/src/cmd/rio/data.c +++ b/sys/src/cmd/rio/data.c @@ -266,11 +266,13 @@ iconinit(void) } } +void resized(void); void redraw(void); + void themeload(char *s, int n) { - int i, fd; + int i, fd, rioback; char *t, *a[2], *e, *newp; Image *newc, *repl; u32int rgb; @@ -280,6 +282,7 @@ themeload(char *s, int n) memmove(t, s, n); t[n] = 0; + rioback = 0; for(s = t; s != nil && *s; s = e){ if((e = strchr(s, '\n')) != nil) *e++ = 0; @@ -316,6 +319,7 @@ themeload(char *s, int n) if(new != nil){ freeimage(col[i]); col[i] = newc; + rioback |= i == Colrioback; } break; } @@ -324,6 +328,8 @@ themeload(char *s, int n) } End: free(t); + if(rioback) + resized(); redraw(); }