---
Doc, it hurts when I do this:

 - have a huge st (say, 100 x 200 rows x cols?)
 - take a floating window and gently wave it over st for a second
   or two, generating lots of Expose events
 - switch to st and try to type
 - wait for 20+ seconds for all the damn redraw()s to finish
 - see typing finally show up

The first thing I tried was to delete expose() from x.c, which has
been working perfectly for the past hour or so: st is responsive
and I haven't seen any visual issues.

Since it seems to work for my specific setup, I'm proposing this
patch, but I'm sort of expecting/hoping that somebody who knows
more than I do (so anything at all) about X11/xcb will explain why
handling Expose events is actually needed. In that case, I'll try
something more complicated to limit an Expose cascade to a single
expose().

Thanks,
S. Gilles

 x.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/x.c b/x.c
index fbfd350..434217b 100644
--- a/x.c
+++ b/x.c
@@ -90,7 +90,6 @@ static int xgeommasktogravity(int);
 static int xloadfont(Font *, FcPattern *);
 static void xunloadfont(Font *);
 
-static void expose(XEvent *);
 static void visibility(XEvent *);
 static void unmap(XEvent *);
 static void kpress(XEvent *);
@@ -115,7 +114,6 @@ static void (*handler[LASTEvent])(XEvent *) = {
        [ConfigureNotify] = resize,
        [VisibilityNotify] = visibility,
        [UnmapNotify] = unmap,
-       [Expose] = expose,
        [FocusIn] = focus,
        [FocusOut] = focus,
        [MotionNotify] = bmotion,
@@ -1440,12 +1438,6 @@ drawregion(int x1, int y1, int x2, int y2)
 }
 
 void
-expose(XEvent *ev)
-{
-       redraw();
-}
-
-void
 visibility(XEvent *ev)
 {
        XVisibilityEvent *e = &ev->xvisibility;
-- 
2.13.1


Reply via email to