]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/xcb.c
Only react on the last Expose event in a series of events. (#2636)
[i3/i3] / i3bar / src / xcb.c
index d3bfca69dc6aea6ba1dffc7f5630a3940292fa00..edef9b7e2dd1edbae31b4376c896f4c2edeedc8f 100644 (file)
@@ -1149,8 +1149,11 @@ void xcb_chk_cb(struct ev_loop *loop, ev_check *watcher, int revents) {
                 handle_visibility_notify((xcb_visibility_notify_event_t *)event);
                 break;
             case XCB_EXPOSE:
-                /* Expose-events happen, when the window needs to be redrawn */
-                redraw_bars();
+                if (((xcb_expose_event_t *)event)->count == 0) {
+                    /* Expose-events happen, when the window needs to be redrawn */
+                    redraw_bars();
+                }
+
                 break;
             case XCB_BUTTON_PRESS:
                 /* Button press events are mouse buttons clicked on one of our bars */