Allow selecting the random placement strategy.
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:45:41 +0000 (01:45 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 26 Jul 2007 19:11:09 +0000 (21:11 +0200)
The hunk for place.c that actually does this seems to have been lost somewhere on the way.

openbox/config.c
openbox/place.h

index 1c6d6c7ad560d81b9448862a4a85d510c687528a..d0e0e6fc6354db73da56bef554d91db0697665c0 100644 (file)
@@ -497,9 +497,12 @@ static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 
     node = node->children;
 
-    if ((n = parse_find_node("policy", node)))
+    if ((n = parse_find_node("policy", node))) {
         if (parse_contains("UnderMouse", doc, n))
             config_place_policy = OB_PLACE_POLICY_MOUSE;
+        if (parse_contains("Random", doc, n))
+            config_place_policy = OB_PLACE_POLICY_RANDOM;
+    }
     if ((n = parse_find_node("center", node)))
         config_place_center = parse_bool(doc, n);
 }
index e2f1d4e40c405e540d2a7da89916165a2951433e..abfbe4bc7935ded2d2fc026f2fb47c831e3b83e2 100644 (file)
@@ -28,6 +28,7 @@ struct _ObAppSettings;
 typedef enum
 {
     OB_PLACE_POLICY_SMART,
+    OB_PLACE_POLICY_RANDOM,
     OB_PLACE_POLICY_MOUSE
 } ObPlacePolicy;