diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/backend.c | 1 | ||||
-rw-r--r-- | backend/drm/drm.c | 1 | ||||
-rw-r--r-- | backend/egl.c | 8 | ||||
-rw-r--r-- | backend/wayland/output.c | 1 |
4 files changed, 4 insertions, 7 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 34c03eea..d52adba9 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -118,6 +118,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, state->drm_invalidated.notify = drm_invalidated; wlr_udev_signal_add(udev, state->dev, &state->drm_invalidated); + state->display = display; struct wl_event_loop *event_loop = wl_display_get_event_loop(display); state->drm_event = wl_event_loop_add_fd(event_loop, state->fd, diff --git a/backend/drm/drm.c b/backend/drm/drm.c index e4790dec..c6e29b86 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -564,6 +564,7 @@ void wlr_drm_scan_connectors(struct wlr_backend_state *state) { scan_property_ids(state->fd, conn, output); + wlr_output_create_global(wlr_output, state->display); list_add(state->outputs, output); wlr_log(L_INFO, "Found display '%s'", wlr_output->name); } else { diff --git a/backend/egl.c b/backend/egl.c index f46a0c83..66aa6a4e 100644 --- a/backend/egl.c +++ b/backend/egl.c @@ -87,7 +87,7 @@ static bool egl_get_config(EGLDisplay disp, EGLConfig *out, EGLenum platform) { for (int i = 0; i < matched; ++i) { EGLint gbm_format; - if(platform == EGL_PLATFORM_WAYLAND_EXT) { + if (platform == EGL_PLATFORM_WAYLAND_EXT) { *out = configs[i]; return true; } @@ -99,8 +99,6 @@ static bool egl_get_config(EGLDisplay disp, EGLConfig *out, EGLenum platform) { continue; } - // XXX: Is GBM_FORMAT_XRGB8888 what we want? - // I don't know if this works for wl_displays. if (gbm_format == GBM_FORMAT_XRGB8888) { *out = configs[i]; return true; @@ -111,7 +109,6 @@ static bool egl_get_config(EGLDisplay disp, EGLConfig *out, EGLenum platform) { return false; } - bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *display) { if (!egl_exts()) { return false; @@ -155,14 +152,12 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *display) { EGL_EXTENSIONS)); wlr_log(L_INFO, "Using %s", glGetString(GL_VERSION)); wlr_log(L_INFO, "Supported OpenGL ES extensions: %s", glGetString(GL_EXTENSIONS)); - return true; error: eglTerminate(egl->display); eglReleaseThread(); eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - return false; } @@ -180,6 +175,5 @@ EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window) { wlr_log(L_ERROR, "Failed to create EGL surface: %s", egl_error()); return EGL_NO_SURFACE; } - return surf; } diff --git a/backend/wayland/output.c b/backend/wayland/output.c index a01ff015..babca2e1 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -150,6 +150,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) { return false; } + wlr_output_create_global(wlr_output, backend->local_display); list_add(backend->outputs, wlr_output); wl_signal_emit(&backend->backend->events.output_add, wlr_output); return wlr_output; |