aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanttu Lakkala <inz@inz.fi>2022-02-17 16:00:47 +0200
committerRomain Gonçalves <me@rgoncalves.se>2024-05-12 21:20:50 +0200
commitffae5e97d840cbe3f5be4904760739cad783af72 (patch)
treebba06859fe15e170f556e97ffb0d333960bc786b
parent5cf4a53838bba66b04b7fcf6b1516d1355521050 (diff)
downloadst-ffae5e97d840cbe3f5be4904760739cad783af72.tar.gz
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.
-rw-r--r--st.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/st.c b/st.c
index 51049ba..c71fa06 100644
--- a/st.c
+++ b/st.c
@@ -1927,7 +1927,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)
@@ -1940,7 +1940,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)
@@ -1953,7 +1953,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)
@@ -1975,7 +1975,7 @@ strhandle(void)
* TODO if defaultbg color is changed, borders
* are dirty
*/
- redraw();
+ tfulldirt();
}
return;
}
remember that computers suck.