From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Fri, 24 Mar 2023 19:21:21 +0000 (+0100) Subject: Decorations: always default to client side decorations X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=471e3837b76bf753d516d339d9472b1413a8f6c4;p=proto%2Flabwc.git 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. --- 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; /*