Allow selecting the random placement strategy. The hunk for place.c that actually...
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:45:41 +0000 (01:45 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Sat, 2 Feb 2008 20:50:21 +0000 (21:50 +0100)
openbox/config.c
openbox/place.h

index bc1ccf1e8936b621b0ba31b27a56b5256e3303fd..629a12366279a93d22db5a145f9cce7b8229fc94 100644 (file)
@@ -479,9 +479,12 @@ static void parse_placement(xmlNodePtr node, gpointer d)
 
     node = node->children;
 
-    if ((n = obt_parse_find_node(node, "policy")))
+    if ((n = obt_parse_find_node(node, "policy"))) {
         if (obt_parse_node_contains(n, "UnderMouse"))
             config_place_policy = OB_PLACE_POLICY_MOUSE;
+        if (obt_parse_node_contains(n, "Random"))
+            config_place_policy = OB_PLACE_POLICY_RANDOM;
+    }
     if ((n = obt_parse_find_node(node, "center")))
         config_place_center = obt_parse_node_bool(n);
     if ((n = obt_parse_find_node(node, "monitor"))) {
index 6a9add40776f6493e0b65c474a6666b55d66e0aa..deb7bbfa12bc927371f368e99dcd6f96885bce68 100644 (file)
@@ -28,6 +28,7 @@ struct _ObAppSettings;
 typedef enum
 {
     OB_PLACE_POLICY_SMART,
+    OB_PLACE_POLICY_RANDOM,
     OB_PLACE_POLICY_MOUSE
 } ObPlacePolicy;