# st

Unnamed repository; edit this file 'description' to name the repository.

| Log | Files | Refs | README | LICENSE

    commit aa4f40148f6d73a82b01bcd2a161e7bbd1559828
    parent aff94637b48d260c98216424664b1aee0ad75213
    Author: c0dev0id <sh+github@codevoid.de>
    Date:   Sat, 31 Jul 2021 19:58:35 +0200

    sdk-xclear

    Diffstat:
    Mst.c | 6++----
    Mwin.h | 1+
    Mx.c | 6++++++

    3 files changed, 9 insertions(+), 4 deletions(-)
    diff --git a/st.c b/st.c
    @@ -1960,10 +1960,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;
    diff --git a/win.h b/win.h
    @@ -38,3 +38,4 @@ void xsetpointermotion(int);
     void xsetsel(char *);
     int xstartdraw(void);
     void xximspot(int, int);
    +void xclearwin(void);
    diff --git a/x.c b/x.c
    @@ -828,6 +828,12 @@ xclear(int x1, int y1, int x2, int y2)
     }

     void
    +xclearwin(void)
    +{
    +	xclear(0, 0, win.w, win.h);
    +}
    +
    +void
     xhints(void)
     {
     	XClassHint class = {opt_name ? opt_name : termname,