tSimplify root window handling - spoon - dwm status utility (2f30 fork)
 (HTM) git clone git://src.adamsgaard.dk/spoon
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 98241199d1a07c7acabf1444889be02df3ea71ef
 (DIR) parent 220e144b8b8571343211d22f246a5477cbc305d0
 (HTM) Author: sin <sin@2f30.org>
       Date:   Sun, 15 May 2016 16:39:25 +0100
       
       Simplify root window handling
       
       Diffstat:
         M spoon.c                             |       6 +-----
       
       1 file changed, 1 insertion(+), 5 deletions(-)
       ---
 (DIR) diff --git a/spoon.c b/spoon.c
       t@@ -189,18 +189,14 @@ loop(void)
        {
                char line[BUFSIZ];
                Display *dpy;
       -        int screen;
       -        Window root;
        
                dpy = XOpenDisplay(NULL);
                if (dpy == NULL)
                        errx(1, "cannot open display");
       -        screen = DefaultScreen(dpy);
       -        root = RootWindow(dpy, screen);
        
                for (;;) {
                        entcat(line, sizeof(line));
       -                XStoreName(dpy, root, line);
       +                XStoreName(dpy, DefaultRootWindow(dpy), line);
                        XSync(dpy, False);
                        sleep(1);
                }