]> Dogcows Code - chaz/openbox/commitdiff
dont allow 0 desktops
authorDana Jansens <danakj@orodu.net>
Fri, 19 Sep 2003 07:30:07 +0000 (07:30 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 19 Sep 2003 07:30:07 +0000 (07:30 +0000)
openbox/config.c

index 73754f0b87d9f502d25bb009c41600a1736a54d6..c58033bb016d2e468423f09b98d5b046a49d51fc 100644 (file)
@@ -227,8 +227,11 @@ static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 
     node = node->children;
     
-    if ((n = parse_find_node("number", node)))
-        config_desktops_num = parse_int(doc, n);
+    if ((n = parse_find_node("number", node))) {
+        guint d = parse_int(doc, n);
+        if (d > 0)
+            config_desktops_num = d;
+    }
     if ((n = parse_find_node("names", node))) {
         GSList *it;
         xmlNodePtr nname;
This page took 0.02337 seconds and 4 git commands to generate.