Add backend detection functions

Resolves #80
This commit is contained in:
Calvin Lee 2017-08-13 23:05:57 +02:00
parent 41e735242d
commit de66bdb867
5 changed files with 17 additions and 4 deletions

View file

@ -52,6 +52,10 @@ static struct wlr_backend_impl backend_impl = {
.get_egl = wlr_drm_backend_get_egl
};
bool wlr_backend_is_drm(struct wlr_backend *b) {
return b->impl == &backend_impl;
}
static void session_signal(struct wl_listener *listener, void *data) {
struct wlr_drm_backend *backend =
wl_container_of(listener, backend, session_signal);