Skip to content

backend: return wlr_session in wlr_backend_autocreate() call

Simon Ser requested to merge emersion/wlroots:drop-backend-get-session into master

Up until now, wlr_backend_autocreate() created the wlr_session and then stuffed it into struct wlr_multi_backend so that compositors can grab it later.

This is an abuse of wlr_multi_backend and the wlr_backend API: wlr_backend_get_session() and wlr_multi_backend.session only exist to accomodate the needs of wlr_backend_autocreate(). What's more, the DRM and libinput backends don't implement wlr_backend_impl.get_session.

Instead, return the struct wlr_session to the compositor in the wlr_backend_autocreate() call.


Breaking change: wlr_backend_autocreate() now takes a new argument to return the wlr_session, wlr_backend_get_session() and wlr_backend_impl.get_session have been removed.

Sway patch: https://github.com/swaywm/sway/pull/7236

Edited by Simon Ser

Merge request reports