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>
Thu, 28 Feb 2008 03:35:10 +0000 (04:35 +0100)
openbox/config.c
openbox/place.h

index 109b215..fa1a2aa 100644 (file)
@@ -502,9 +502,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 6a9add4..deb7bbf 100644 (file)
@@ -28,6 +28,7 @@ struct _ObAppSettings;
 typedef enum
 {
     OB_PLACE_POLICY_SMART,
+    OB_PLACE_POLICY_RANDOM,
     OB_PLACE_POLICY_MOUSE
 } ObPlacePolicy;