Fixed XCloseDisplay() which is not reached in keyboard_indicators() - slstatus - suckless status monitor. mirror from suckless.org
 (HTM) git clone git://git.drkhsh.at/slstatus.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b11dd2db0ebfc0b20ef2d5a972f13cf39bdd0b31
 (DIR) parent 823f2d047f9f14c5e401c337274c8c19542b3065
 (HTM) Author: Aaron Marcher <info@nulltime.net>
       Date:   Mon, 23 Jan 2017 21:01:41 +0100
       
       Fixed XCloseDisplay() which is not reached in keyboard_indicators()
       
       Diffstat:
         M slstatus.c                          |       3 +--
       
       1 file changed, 1 insertion(+), 2 deletions(-)
       ---
 (DIR) diff --git a/slstatus.c b/slstatus.c
       @@ -329,6 +329,7 @@ keyboard_indicators(void)
                Display *dpy = XOpenDisplay(NULL);
                XKeyboardState state;
                XGetKeyboardControl(dpy, &state);
       +        XCloseDisplay(dpy);
        
                switch (state.led_mask) {
                        case 1:
       @@ -343,8 +344,6 @@ keyboard_indicators(void)
                        default:
                                return smprintf("");
                }
       -
       -        XCloseDisplay(dpy);
        }
        
        static char *