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.
This commit is contained in:
parent
175703708f
commit
a32ecc988b
8
st.c
8
st.c
|
@ -2027,7 +2027,7 @@ strhandle(void)
|
||||||
else if (xsetcolorname(defaultfg, p))
|
else if (xsetcolorname(defaultfg, p))
|
||||||
fprintf(stderr, "erresc: invalid foreground color: %s\n", p);
|
fprintf(stderr, "erresc: invalid foreground color: %s\n", p);
|
||||||
else
|
else
|
||||||
redraw();
|
tfulldirt();
|
||||||
return;
|
return;
|
||||||
case 11:
|
case 11:
|
||||||
if (narg < 2)
|
if (narg < 2)
|
||||||
|
@ -2040,7 +2040,7 @@ strhandle(void)
|
||||||
else if (xsetcolorname(defaultbg, p))
|
else if (xsetcolorname(defaultbg, p))
|
||||||
fprintf(stderr, "erresc: invalid background color: %s\n", p);
|
fprintf(stderr, "erresc: invalid background color: %s\n", p);
|
||||||
else
|
else
|
||||||
redraw();
|
tfulldirt();
|
||||||
return;
|
return;
|
||||||
case 12:
|
case 12:
|
||||||
if (narg < 2)
|
if (narg < 2)
|
||||||
|
@ -2053,7 +2053,7 @@ strhandle(void)
|
||||||
else if (xsetcolorname(defaultcs, p))
|
else if (xsetcolorname(defaultcs, p))
|
||||||
fprintf(stderr, "erresc: invalid cursor color: %s\n", p);
|
fprintf(stderr, "erresc: invalid cursor color: %s\n", p);
|
||||||
else
|
else
|
||||||
redraw();
|
tfulldirt();
|
||||||
return;
|
return;
|
||||||
case 4: /* color set */
|
case 4: /* color set */
|
||||||
if (narg < 3)
|
if (narg < 3)
|
||||||
|
@ -2075,7 +2075,7 @@ strhandle(void)
|
||||||
* TODO if defaultbg color is changed, borders
|
* TODO if defaultbg color is changed, borders
|
||||||
* are dirty
|
* are dirty
|
||||||
*/
|
*/
|
||||||
redraw();
|
tfulldirt();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue