[st][PATCH] xclearwin clears the window

When an OCS sequence was used to change the bg color, the borders where
dirty. This simple patch just clears the window before the redraw of the
terminal when the bg color has been changed. This is apparently enough
and seams to be very smooth. There was a TODO comment for it on the st.c
file, which I removed.
This commit is contained in:
bakkeby 2020-04-20 12:19:05 +02:00
parent a4d8ea1853
commit 24c9ea1e51
2 changed files with 3 additions and 4 deletions

6
st.c
View File

@ -2021,10 +2021,8 @@ strhandle(void)
fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
j, p ? p : "(null)");
} else {
/*
* TODO if defaultbg color is changed, borders
* are dirty
*/
if (j == defaultbg)
xclearwin();
redraw();
}
return;

1
win.h
View File

@ -40,3 +40,4 @@ void xsetpointermotion(int);
void xsetsel(char *);
int xstartdraw(void);
void xximspot(int, int);
void xclearwin(void);