Shark.cpp
branchv_0
changeset 20 0899e966993e
parent 19 262828ae9682
child 24 98d033d3ef7c
--- 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=";