diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-05-03 16:23:07 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-05-03 16:23:07 +1200 |
commit | 81998fdc98231cb1b2e050da2fcec7c75d46320c (patch) | |
tree | 1ccf64d2df9a5942e8b497df9a5f766eaf92aac2 /example | |
parent | 762ac7f4c0168bf2ce536d94b3b44cb95939d769 (diff) |
Removed old session code from DRM backend.
Diffstat (limited to 'example')
-rw-r--r-- | example/CMakeLists.txt | 1 | ||||
-rw-r--r-- | example/example-drm.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index dfb069b4..fb2f3823 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -12,4 +12,5 @@ add_executable(example-drm target_link_libraries(example-drm wlr-backend + wlr-session ) diff --git a/example/example-drm.c b/example/example-drm.c index 4c944226..a3a2a8fd 100644 --- a/example/example-drm.c +++ b/example/example-drm.c @@ -6,6 +6,7 @@ #include <GLES3/gl3.h> #include <wlr/backend/drm.h> +#include <wlr/session.h> struct state { float color[3]; @@ -92,7 +93,13 @@ int main() wl_list_init(&state.render.link); clock_gettime(CLOCK_MONOTONIC, &state.last_frame); - struct wlr_drm_backend *wlr = wlr_drm_backend_init(&state.add, &state.rem, &state.render); + struct wlr_session *session = wlr_session_start(); + if (!session) { + return 1; + } + + struct wlr_drm_backend *wlr = wlr_drm_backend_init(session, + &state.add, &state.rem, &state.render); bool done = false; struct wl_event_loop *event_loop = wlr_drm_backend_get_event_loop(wlr); |