X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=client.c;h=331c201fab83e495f660fcb655091f2b529d3156;hb=24ea087d5ec89e6ad72ebdabdf042a089cc8ead8;hp=8b439f316462a16352fcf4c3bed54696b5290a08;hpb=0ab80500fd3a7e262417c707022dffbcd8655ba6;p=osdd.git diff --git a/client.c b/client.c index 8b439f3..331c201 100644 --- a/client.c +++ b/client.c @@ -13,6 +13,7 @@ #include #undef DEBUG +#include "util.h" #include "osd.h" static Display *dpy; @@ -102,6 +103,8 @@ osd_wait(int delay) poll(&pfd, 1, wait_until - now); if (pfd.revents & POLLIN) { + // We use the event loop only to detect that the X server has been shut down. + // In such cases, xlib raises an error and exits. XEvent ev; while (XPending(dpy)) XNextEvent(dpy, &ev);