mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
rootston: handle backend creation failed
This commit is contained in:
parent
ca6a0ef1bb
commit
ee39dff1e7
4 changed files with 15 additions and 3 deletions
|
|
@ -42,7 +42,6 @@ static void subbackend_state_destroy(struct subbackend_state *sub) {
|
|||
|
||||
static void multi_backend_destroy(struct wlr_backend *wlr_backend) {
|
||||
struct wlr_multi_backend *backend = (struct wlr_multi_backend *)wlr_backend;
|
||||
wl_list_remove(&backend->display_destroy.link);
|
||||
struct subbackend_state *sub, *next;
|
||||
wl_list_for_each_safe(sub, next, &backend->backends, link) {
|
||||
// XXX do we really want to take ownership over added backends?
|
||||
|
|
@ -190,3 +189,9 @@ struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) {
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool wlr_multi_is_empty(struct wlr_backend *_backend) {
|
||||
assert(wlr_backend_is_multi(_backend));
|
||||
struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend;
|
||||
return wl_list_length(&backend->backends) < 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue