# $OpenBSD: patch-xstatbar_c,v 1.3 2020/10/12 10:41:35 cwen Exp $

Hunk #1: parse properly options on archs where char is unsigned
         by default (arm, ppc)

Index: xstatbar.c
--- xstatbar.c.orig
+++ xstatbar.c
@@ -51,7 +51,7 @@ main (int argc, char *argv[])
 {
    const char *errstr;
    char *font;
-   char  ch;
+   int   ch;
    int   x, y, w, h;
    int   sleep_seconds;
 
@@ -297,6 +297,7 @@ draw_divider(XColor color, int x, int width)
 void
 draw()
 {
+   XEvent dummy;
    static int spacing = 10;
    int x, y;
    int cpu;
@@ -323,6 +324,7 @@ draw()
    /* copy the buffer to the window and flush */
    XCopyArea(XINFO.disp, XINFO.buf, XINFO.win, XINFO.gc,
       0, 0, XINFO.width, XINFO.height, 0, 0);
+   XNextEvent(XINFO.disp, &dummy);
    XFlush(XINFO.disp);
 }
 
