From 4be0d78ece253f5d1dd285ea29812ae37eb0c893 Mon Sep 17 00:00:00 2001 From: Santtu Lakkala Date: Thu, 17 Feb 2022 16:00:47 +0200 Subject: [PATCH] Delay redrawals on palette changes Build on auto-sync and only mark window dirty on palette changes and let the event handler do the actual draw. --- st.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index 87d992d..6bd0ba3 100644 --- a/st.c +++ b/st.c @@ -1989,7 +1989,7 @@ strhandle(void) else if (xsetcolorname(defaultfg, p)) fprintf(stderr, "erresc: invalid foreground color: %s\n", p); else - redraw(); + tfulldirt(); return; case 11: if (narg < 2) @@ -2002,7 +2002,7 @@ strhandle(void) else if (xsetcolorname(defaultbg, p)) fprintf(stderr, "erresc: invalid background color: %s\n", p); else - redraw(); + tfulldirt(); return; case 12: if (narg < 2) @@ -2015,7 +2015,7 @@ strhandle(void) else if (xsetcolorname(defaultcs, p)) fprintf(stderr, "erresc: invalid cursor color: %s\n", p); else - redraw(); + tfulldirt(); return; case 4: /* color set */ if (narg < 3) @@ -2037,7 +2037,7 @@ strhandle(void) * TODO if defaultbg color is changed, borders * are dirty */ - redraw(); + tfulldirt(); } return; } -- 2.43.0