]> git.mdlowis.com Git - proto/labwc.git/commitdiff
config: temporarily set xwaylandPersistence to 'yes' by default (#2414)
authorJohan Malm <jgm323@gmail.com>
Sun, 8 Dec 2024 18:36:59 +0000 (18:36 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 8 Dec 2024 21:18:38 +0000 (21:18 +0000)
...to avoid a bug that is present in wlroots <0.18.2 and which has the
potential to crash the compositor when performing a drag-and-drop action
at the same time as the XWayland server is shutting down.

This will be reverted when wlroots-0.18.2 can be linked with.

Related-to: #2371
docs/labwc-config.5.scd
docs/rc.xml.all
src/config/rcxml.c

index aff0e62a237bfd61d6bbd6048d2373b5667f0c57..d9f939fa5fc71196a3821ca85ab80af2f5c4b5ae 100644 (file)
@@ -172,7 +172,7 @@ this is for compatibility with Openbox.
   <adaptiveSync>no</adaptiveSync>
   <allowTearing>no</allowTearing>
   <reuseOutputMode>no</reuseOutputMode>
-  <xwaylandPersistence>no</xwaylandPersistence>
+  <xwaylandPersistence>yes</xwaylandPersistence>
 </core>
 ```
 
@@ -219,7 +219,13 @@ this is for compatibility with Openbox.
 *<core><xwaylandPersistence>* [yes|no]
        Keep XWayland alive even when no clients are connected, rather than
        using a "lazy" policy that allows the server to launch on demand and die
-       when it is no longer needed. Default is no.
+       when it is no longer needed. Default is yes.
+
+       This is only temporarily defaulting to yes to avoid a bug that is
+       present in wlroots <0.18.2 resulting in a compositor crash when
+       performing a drag-and-drop action at the same time as the XWayland
+       server is shutting down. This will be reverted to a default "no" when
+       wlroots-0.18.2 can be linked with.
 
        Note: changing this setting requires a restart of labwc.
 
index ae66fe4c29315cacf8717a8635b1546883d027a7..aa24838c30832bf7abc80321e59d97c53bdfeb5f 100644 (file)
@@ -13,7 +13,7 @@
     <adaptiveSync>no</adaptiveSync>
     <allowTearing>no</allowTearing>
     <reuseOutputMode>no</reuseOutputMode>
-    <xwaylandPersistence>no</xwaylandPersistence>
+    <xwaylandPersistence>yes</xwaylandPersistence>
   </core>
 
   <placement>
index cb064fc00f8c8e6344dd0e06f59fe7c61eb4d914..a8cb9d3b32aace0c2124b053ab3cdab2dc005cc1 100644 (file)
@@ -1088,6 +1088,17 @@ entry(xmlNode *node, char *nodename, char *content)
                }
        } else if (!strcasecmp(nodename, "xwaylandPersistence.core")) {
                set_bool(content, &rc.xwayland_persistence);
+
+               /*
+                * TODO: Temporary warning message. Revert when wlroots-0.18.2
+                * can be linked with.
+                */
+               if (!rc.xwayland_persistence) {
+                       wlr_log(WLR_ERROR, "setting xwaylandPersistence to 'no' "
+                               "is not encouraged unless wlroots-0.18.2 is used "
+                               "since it has a potential risk of crashing the "
+                               "entire session. See #2371 for details.");
+               }
        } else if (!strcasecmp(nodename, "x.cascadeOffset.placement")) {
                rc.placement_cascade_offset_x = atoi(content);
        } else if (!strcasecmp(nodename, "y.cascadeOffset.placement")) {
@@ -1452,7 +1463,7 @@ rcxml_init(void)
        rc.adaptive_sync = LAB_ADAPTIVE_SYNC_DISABLED;
        rc.allow_tearing = false;
        rc.reuse_output_mode = false;
-       rc.xwayland_persistence = false;
+       rc.xwayland_persistence = true;
 
        init_font_defaults(&rc.font_activewindow);
        init_font_defaults(&rc.font_inactivewindow);