]> mj.ucw.cz Git - osdd.git/commitdiff
Explain the exit-on-X-server-shutdown trick
authorMartin Mares <mj@ucw.cz>
Sat, 17 Jul 2010 18:44:35 +0000 (20:44 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 17 Jul 2010 18:44:35 +0000 (20:44 +0200)
client.c

index 8b439f316462a16352fcf4c3bed54696b5290a08..b55a630a813e24e66d0270a24f496cb943ecdc26 100644 (file)
--- a/client.c
+++ b/client.c
@@ -102,6 +102,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);