From 705c6d1dd8e01dd1650ae86c610b3c518d3c94ea Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Fri, 24 Mar 2023 20:21:21 +0100 Subject: [PATCH] Decorations: always default to client side decorations This is required as both decoration protocol variants, the xdg one and the deprecated kde one, assume that an application that did not negotiate any decorations will render client side decorations. --- src/xdg.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/xdg.c b/src/xdg.c index 921a5864..806be850 100644 --- a/src/xdg.c +++ b/src/xdg.c @@ -545,7 +545,21 @@ xdg_surface_new(struct wl_listener *listener, void *data) node_descriptor_create(&view->scene_tree->node, LAB_NODE_DESC_VIEW, view); - /* In support of xdg_toplevel_decoration and kde_server_decoration */ + /* + * The xdg_toplevel_decoration and kde_server_decoration protocols + * expects clients to use client side decorations unless server side + * decorations are negotiated. So we default to client side ones here. + * + * TODO: We may want to assign the default based on a new rc.xml + * config option like "enforce-server" in the future. + */ + view->ssd_preference = LAB_SSD_PREF_CLIENT; + + /* + * xdg_toplevel_decoration and kde_server_decoration use this + * pointer to connect the view to a decoration object that may + * be created in the future. + */ xdg_surface->data = view; /*