]> git.mdlowis.com Git - proto/labwc.git/commitdiff
placement: set default placement policy to cascade
authortokyo4j <hrak1529@gmail.com>
Wed, 13 Nov 2024 21:12:27 +0000 (06:12 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 14 Nov 2024 08:21:01 +0000 (09:21 +0100)
docs/labwc-config.5.scd
docs/rc.xml.all
src/config/rcxml.c

index 66a8d61110754a30c7bbc4e524bb1d452ca1d53c..9d469dde2768657d1bdeee75c30294d7b1d5c492 100644 (file)
@@ -232,7 +232,7 @@ this is for compatibility with Openbox.
        center new windows under the cursor. The "cascade" policy will try to
        place new windows at the center of the active output, but possibly
        shifts its position to bottom-right not to cover existing windows.
-       Default is "center".
+       Default is "cascade".
 
 *<placement><cascadeOffset><x>*++
 *<placement><cascadeOffset><y>*
index b1a8bae6a88119795a029b5715b37c9165e71921..addb03d4711b2dea05825285163d5a92061b760e 100644 (file)
@@ -17,7 +17,7 @@
   </core>
 
   <placement>
-    <policy>center</policy>
+    <policy>cascade</policy>
     <!--
       When <placement><policy> is "cascade", the offset for cascading new
       windows can be overwritten like this:
index e4f6426ed7316bb2b5b14211fb30abfb17b20863..3951c72fbc13d522d1b9eeaa7e3cd36475e36007 100644 (file)
@@ -1079,9 +1079,9 @@ entry(xmlNode *node, char *nodename, char *content)
        } else if (!strcasecmp(nodename, "reuseOutputMode.core")) {
                set_bool(content, &rc.reuse_output_mode);
        } else if (!strcmp(nodename, "policy.placement")) {
-               rc.placement_policy = view_placement_parse(content);
-               if (rc.placement_policy == LAB_PLACE_INVALID) {
-                       rc.placement_policy = LAB_PLACE_CENTER;
+               enum view_placement_policy policy = view_placement_parse(content);
+               if (policy != LAB_PLACE_INVALID) {
+                       rc.placement_policy = policy;
                }
        } else if (!strcasecmp(nodename, "xwaylandPersistence.core")) {
                set_bool(content, &rc.xwayland_persistence);
@@ -1434,7 +1434,7 @@ rcxml_init(void)
        }
        has_run = true;
 
-       rc.placement_policy = LAB_PLACE_CENTER;
+       rc.placement_policy = LAB_PLACE_CASCADE;
        rc.placement_cascade_offset_x = 0;
        rc.placement_cascade_offset_y = 0;