aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
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 /include/wlr
parent0d23fb7b6dc79b82301f3c049e05d1556a187b0f (diff)
parentb4d46aa9c255ccb6f121b3657f6910c29e02d704 (diff)
Merge pull request #1262 from nyorain/session_fix
Improve session handling
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/backend.h5
-rw-r--r--include/wlr/backend/drm.h2
-rw-r--r--include/wlr/backend/interface.h1
-rw-r--r--include/wlr/backend/multi.h1
4 files changed, 6 insertions, 3 deletions
diff --git a/include/wlr/backend.h b/include/wlr/backend.h
index 39d072e2..dfb8d2a8 100644
--- a/include/wlr/backend.h
+++ b/include/wlr/backend.h
@@ -57,5 +57,10 @@ void wlr_backend_destroy(struct wlr_backend *backend);
* Obtains the wlr_renderer reference this backend is using.
*/
struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend);
+/**
+ * Obtains the wlr_session reference from this backend if there is any.
+ * Might return NULL for backends that don't use a session.
+ */
+struct wlr_session *wlr_backend_get_session(struct wlr_backend *backend);
#endif
diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h
index 5d47647d..3724adfb 100644
--- a/include/wlr/backend/drm.h
+++ b/include/wlr/backend/drm.h
@@ -34,6 +34,4 @@ bool wlr_output_is_drm(struct wlr_output *output);
typedef struct _drmModeModeInfo drmModeModeInfo;
bool wlr_drm_connector_add_mode(struct wlr_output *output, const drmModeModeInfo *mode);
-struct wlr_session *wlr_drm_backend_get_session(struct wlr_backend *backend);
-
#endif
diff --git a/include/wlr/backend/interface.h b/include/wlr/backend/interface.h
index f3dee69b..2c300709 100644
--- a/include/wlr/backend/interface.h
+++ b/include/wlr/backend/interface.h
@@ -17,6 +17,7 @@ struct wlr_backend_impl {
bool (*start)(struct wlr_backend *backend);
void (*destroy)(struct wlr_backend *backend);
struct wlr_renderer *(*get_renderer)(struct wlr_backend *backend);
+ struct wlr_session *(*get_session)(struct wlr_backend *backend);
};
/**
diff --git a/include/wlr/backend/multi.h b/include/wlr/backend/multi.h
index ef908d26..0687f4b6 100644
--- a/include/wlr/backend/multi.h
+++ b/include/wlr/backend/multi.h
@@ -28,7 +28,6 @@ void wlr_multi_backend_remove(struct wlr_backend *multi,
struct wlr_backend *backend);
bool wlr_backend_is_multi(struct wlr_backend *backend);
-struct wlr_session *wlr_multi_get_session(struct wlr_backend *base);
bool wlr_multi_is_empty(struct wlr_backend *backend);
void wlr_multi_for_each_backend(struct wlr_backend *backend,