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.
This commit is contained in:
Consolatis 2023-03-24 20:21:21 +01:00 committed by Johan Malm
parent ef30e3750d
commit 471e3837b7

View file

@ -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;
/*