aboutsummaryrefslogtreecommitdiff
path: root/backend/multi/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-04 17:36:39 +0200
committerGitHub <noreply@github.com>2018-10-04 17:36:39 +0200
commit841d04db994b0a05d7688a0ecaa9b2e29131f026 (patch)
tree71d1e442666f05fd0312acd672383c6440c63ff0 /backend/multi/backend.c
parent0d23fb7b6dc79b82301f3c049e05d1556a187b0f (diff)
parentb4d46aa9c255ccb6f121b3657f6910c29e02d704 (diff)
Merge pull request #1262 from nyorain/session_fix
Improve session handling
Diffstat (limited to 'backend/multi/backend.c')
-rw-r--r--backend/multi/backend.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index 3707fe34..2f4b929f 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -1,7 +1,6 @@
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <wlr/backend/drm.h>
#include <wlr/backend/interface.h>
#include <wlr/backend/session.h>
#include <wlr/util/log.h>
@@ -72,10 +71,17 @@ static struct wlr_renderer *multi_backend_get_renderer(
return NULL;
}
+static struct wlr_session *multi_backend_get_session(
+ struct wlr_backend *_backend) {
+ struct wlr_multi_backend *backend = multi_backend_from_backend(_backend);
+ return backend->session;
+}
+
struct wlr_backend_impl backend_impl = {
.start = multi_backend_start,
.destroy = multi_backend_destroy,
.get_renderer = multi_backend_get_renderer,
+ .get_session = multi_backend_get_session,
};
static void handle_display_destroy(struct wl_listener *listener, void *data) {
@@ -191,17 +197,6 @@ void wlr_multi_backend_remove(struct wlr_backend *_multi,
}
}
-struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) {
- struct wlr_multi_backend *backend = multi_backend_from_backend(_backend);
- struct subbackend_state *sub;
- wl_list_for_each(sub, &backend->backends, link) {
- if (wlr_backend_is_drm(sub->backend)) {
- return wlr_drm_backend_get_session(sub->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;