backend/multi: improve type-safety by exposing wlr_multi_backend

Expose an opaque wlr_multi_backend struct. That way functions
operating on a multi backend can take this struct instead of a
generic wlr_backend, without having to assert.
This commit is contained in:
Simon Ser 2023-02-27 11:48:18 +01:00
parent b1e38fc7ea
commit 7e633eea50
6 changed files with 50 additions and 46 deletions

View file

@ -7,7 +7,7 @@
* Helper to create new DRM sub-backends on GPU hotplug.
*/
struct wlr_drm_backend_monitor {
struct wlr_backend *multi;
struct wlr_multi_backend *multi;
struct wlr_backend *primary_drm;
struct wlr_session *session;
@ -18,7 +18,7 @@ struct wlr_drm_backend_monitor {
};
struct wlr_drm_backend_monitor *drm_backend_monitor_create(
struct wlr_backend *multi, struct wlr_backend *primary_drm,
struct wlr_multi_backend *multi, struct wlr_backend *primary_drm,
struct wlr_session *session);
#endif