From 65cba604d6f2f42ad7210b5d17f52eec3c6c48fa Mon Sep 17 00:00:00 2001 From: Jens Nyberg Date: Thu, 21 Feb 2013 00:31:06 +0100 Subject: [PATCH] Let draw only be called by main loop This increases the drawing speed significantly and st feels much less sluggish. --- st.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/st.c b/st.c index 300e5ec..c3f6989 100644 --- a/st.c +++ b/st.c @@ -748,7 +748,6 @@ bpress(XEvent *e) { if(sel.bx != -1) { sel.bx = -1; tsetdirt(sel.b.y, sel.e.y); - draw(); } sel.mode = 1; sel.type = SEL_REGULAR; @@ -2917,15 +2916,9 @@ xresettitle(void) { void redraw(int timeout) { - struct timespec tv = {0, timeout * 1000}; tfulldirt(); - draw(); - if(timeout > 0) { - nanosleep(&tv, NULL); - XSync(xw.dpy, False); /* necessary for a good tput flash */ - } } void -- 1.8.1.3