DustVoice's st (from suckless.org) fork
c5a9b799d4
draw() runs over all lines of the screen and renders only the dirty lines, this avoids render lines which are not modified since last draw() call. In this moment the main loop is something like: - Wait something to read from file descriptors - Read from pseudo tty - Call draw() for rending - Read X events This cause the problem that all the X events that have to update the screen have to call draw() (because draw() is called before of X events handling), so you can have multiples renderings in only one iteration, that will waste a lot of resources. This patch change the main loop to: - Wait something to read from file descriptors - Read from pseudo tty - Read X events - Call draw() for rending So X events don't have to worry about rendering, because draw() is called after them. The only place where draw is called outside of the main loop is in redraw(), but it is necessary for getting a good tput flash. --- st.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) |
||
---|---|---|
.hgtags | ||
config.def.h | ||
config.mk | ||
LEGACY | ||
LICENSE | ||
Makefile | ||
README | ||
st.1 | ||
st.c | ||
st.info | ||
TODO |
st - simple terminal -------------------- st is a simple virtual terminal emulator for X which sucks less. Requirements ------------ In order to build st you need the Xlib header files. Installation ------------ Edit config.mk to match your local setup (st is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install st (if necessary as root): make clean install Running st ---------- If you don't install st, define TNAME to "xterm" in config.h or make sure to at least compile st terminfo entry with the following command: tic -s st.info It should print the path of the compiled terminfo entry. You can safely remove it if you don't plan to use st anymore. See the man page for additional details. Credits ------- Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.