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@gmail.com>
Sat, 11 Oct 2014 00:17:17 +0000 (02:17 +0200)
openbox/config.c
openbox/place.h

index 76f4856..212be65 100644 (file)
@@ -629,6 +629,8 @@ static void parse_placement(xmlNodePtr node, gpointer d)
     if ((n = obt_xml_find_node(node, "policy"))) {
         if (obt_xml_node_contains(n, "UnderMouse"))
             config_place_policy = OB_PLACE_POLICY_MOUSE;
+        if (obt_xml_node_contains(n, "Random"))
+            config_place_policy = OB_PLACE_POLICY_RANDOM;
     }
     if ((n = obt_xml_find_node(node, "center"))) {
         config_place_center = obt_xml_node_bool(n);
index 792fc38..081f88f 100644 (file)
@@ -30,6 +30,7 @@ struct _ObAppSettings;
 typedef enum
 {
     OB_PLACE_POLICY_SMART,
+    OB_PLACE_POLICY_RANDOM,
     OB_PLACE_POLICY_MOUSE
 } ObPlacePolicy;