aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
diff options
context:
space:
mode:
Diffstat (limited to 'backend/headless')
-rw-r--r--backend/headless/backend.c2
-rw-r--r--backend/headless/output.c17
2 files changed, 8 insertions, 11 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index 61409d41..0bf5ec28 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -51,6 +51,8 @@ static void backend_destroy(struct wlr_backend *wlr_backend) {
wlr_input_device_destroy(&input_device->wlr_input_device);
}
+ wl_signal_emit(&wlr_backend->events.destroy, backend);
+
wlr_egl_finish(&backend->egl);
free(backend);
}
diff --git a/backend/headless/output.c b/backend/headless/output.c
index 9fc92e88..aac7cc20 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -48,25 +48,20 @@ static void output_transform(struct wlr_output *wlr_output,
output->wlr_output.transform = transform;
}
-static void output_make_current(struct wlr_output *wlr_output) {
+static bool output_make_current(struct wlr_output *wlr_output, int *buffer_age) {
struct wlr_headless_output *output =
(struct wlr_headless_output *)wlr_output;
- if (!eglMakeCurrent(output->backend->egl.display,
- output->egl_surface, output->egl_surface,
- output->backend->egl.context)) {
- wlr_log(L_ERROR, "eglMakeCurrent failed: %s", egl_error());
- }
+ return wlr_egl_make_current(&output->backend->egl, output->egl_surface,
+ buffer_age);
}
-static void output_swap_buffers(struct wlr_output *wlr_output) {
- // No-op
+static bool output_swap_buffers(struct wlr_output *wlr_output) {
+ return true; // No-op
}
static void output_destroy(struct wlr_output *wlr_output) {
struct wlr_headless_output *output =
(struct wlr_headless_output *)wlr_output;
- wl_signal_emit(&output->backend->backend.events.output_remove,
- &output->wlr_output);
wl_list_remove(&output->link);
@@ -88,7 +83,7 @@ bool wlr_output_is_headless(struct wlr_output *wlr_output) {
static int signal_frame(void *data) {
struct wlr_headless_output *output = data;
- wl_signal_emit(&output->wlr_output.events.frame, &output->wlr_output);
+ wlr_output_send_frame(&output->wlr_output);
wl_event_source_timer_update(output->frame_timer, output->frame_delay);
return 0;
}