--- a/Shark.cpp Mon Dec 04 21:03:53 2023 +0100
+++ b/Shark.cpp Tue Dec 05 22:55:25 2023 +0100
@@ -311,6 +311,7 @@
logOutput << "trace: no pending X11 event" << std::endl;
break;
}
+process_x11_event:
XWindowAttributes gwa;
XNextEvent(dpy, &xev);
@@ -380,6 +381,7 @@
} else {
std::cout << "XEvent: type=" << xev.type << std::endl;
}
+ if (XPending(dpy)) goto process_x11_event;
} else if (epoll[epollEvent].data.fd == STDIN_FILENO) {
int epollFD = epoll[epollEvent].data.fd;
logOutput << "other event: fd=" << epollFD << " data=";