This commit is contained in:
2026-01-02 22:53:34 +07:00
commit a12293fd3a
22 changed files with 915 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#include <stdlib.h>
#include "types.h"
void output_frame(struct wl_listener *listener, void *data)
{
struct absinthe_output *output = wl_container_of(listener, output, frame);
struct wlr_scene *scene = output->server->scene;
struct wlr_scene_output *scene_output = wlr_scene_get_scene_output(scene, output->wlr_output);
wlr_scene_output_commit(scene_output, NULL);
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
wlr_scene_output_send_frame_done(scene_output, &now);
}
void output_request_state(struct wl_listener *listener, void *data)
{
struct absinthe_output *output = wl_container_of(listener, output, request_state);
const struct wlr_output_event_request_state *event = data;
wlr_output_commit_state(output->wlr_output, event->state);
}
void output_destroy(struct wl_listener *listener, void *data)
{
struct absinthe_output *output = wl_container_of(listener, output, request_state);
wl_list_remove(&output->frame.link);
wl_list_remove(&output->request_state.link);
wl_list_remove(&output->destroy.link);
wl_list_remove(&output->link);
free(output);
}