Fix X error when border_width is <1.
authorBrenden Matthews <brenden@diddyinc.com>
Wed, 7 Apr 2010 17:59:45 +0000 (10:59 -0700)
committerBrenden Matthews <brenden@diddyinc.com>
Wed, 7 Apr 2010 17:59:45 +0000 (10:59 -0700)
src/conky.c
src/x11.c

index 790e93c..1254abe 100644 (file)
@@ -4295,11 +4295,11 @@ static void set_default_configurations(void)
        text_alignment = BOTTOM_LEFT;
        info.x11.monitor.number = 1;
        info.x11.monitor.current = 0;
-       info.x11.desktop.current = 1; 
+       info.x11.desktop.current = 1;
        info.x11.desktop.number = 1;
        info.x11.desktop.nitems = 0;
-       info.x11.desktop.all_names = NULL; 
-       info.x11.desktop.name = NULL; 
+       info.x11.desktop.all_names = NULL;
+       info.x11.desktop.name = NULL;
 #endif /* X11 */
 
        free_templates();
@@ -4622,7 +4622,7 @@ char load_config_file(const char *f)
                CONF("border_width") {
                        if (value) {
                                window.border_width = strtol(value, 0, 0);
-                               if (window.border_width < 0) window.border_width = 0;
+                               if (window.border_width < 1) window.border_width = 1;
                        } else {
                                CONF_ERR;
                        }
index 46a4629..a64d5b5 100644 (file)
--- a/src/x11.c
+++ b/src/x11.c
@@ -336,7 +336,7 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour,
                        XClassHint classHint;
                        XWMHints wmHint;
                        Atom xa;
-                       
+
 #ifdef USE_ARGB
                        if (have_argb_visual) {
                                attrs.colormap = window.colourmap;