static void restore_handle_event(int type, xcb_generic_event_t *event) {
switch (type) {
case XCB_EXPOSE:
- expose_event((xcb_expose_event_t *)event);
+ if (((xcb_expose_event_t *)event)->count == 0) {
+ expose_event((xcb_expose_event_t *)event);
+ }
+
break;
case XCB_CONFIGURE_NOTIFY:
configure_notify((xcb_configure_notify_event_t *)event);