No description
Find a file
Roberto E. Vargas Caballero c5a9b799d4 Render only once in each main loop iteration
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(-)
2012-09-16 10:48:38 +02:00
.hgtags Added tag 0.2.1 for changeset 108926a0fe61 2012-02-16 01:05:26 +01:00
config.def.h Implementing italic-bold. This will require an increase of the avgWdth. 2012-09-14 19:46:07 +02:00
config.mk Implement Xdbe-based double-buffering 2012-07-28 14:27:26 +02:00
LEGACY Adding a statemant on legacy support. 2012-09-13 07:04:59 +02:00
LICENSE Applying the patches of k0ga and changing the LICENSE file in the appropriate 2012-08-29 20:01:34 +02:00
Makefile Adding setb and setf and a comment about terminfo installation. 2012-08-29 21:13:47 +02:00
README update README. 2011-04-03 21:40:33 +02:00
st.1 Add -g geometry to st and the manpage. 2012-09-03 23:02:29 +02:00
st.c Render only once in each main loop iteration 2012-09-16 10:48:38 +02:00
st.info Implement italic font support. 2012-09-05 21:48:26 +02:00
TODO Remove timeout in the main loop 2012-09-16 10:47:21 +02:00

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.