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. Ref. - https://git.suckless.org/st/commit/e823e2308f2a99023032a3966ebb7036a31d305f.html
This commit is contained in:
parent
cc4595779d
commit
4a156b95f9
3 changed files with 14 additions and 22 deletions
8
st.c
8
st.c
|
|
@ -2492,7 +2492,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)
|
||||
|
|
@ -2505,7 +2505,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)
|
||||
|
|
@ -2518,7 +2518,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 ((par == 4 && narg < 3) || narg < 2)
|
||||
|
|
@ -2545,7 +2545,7 @@ strhandle(void)
|
|||
} else {
|
||||
if (j == defaultbg)
|
||||
xclearwin();
|
||||
redraw();
|
||||
tfulldirt();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue