From 33bfb59b62e13808fcdff9d8dc39326b9b859933 Mon Sep 17 00:00:00 2001 From: buffet Date: Thu, 7 Mar 2019 19:38:50 +0100 Subject: [PATCH] Not sure why statics weren't on top --- kiwmi/output.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/kiwmi/output.c b/kiwmi/output.c index bad81e7..7ba95ea 100644 --- a/kiwmi/output.c +++ b/kiwmi/output.c @@ -15,29 +15,6 @@ #include "kiwmi/server.h" -static void output_frame_notify(struct wl_listener *listener, void *data); -static void output_destroy_notify(struct wl_listener *listener, void *data); - -struct kiwmi_output * -output_create(struct wlr_output *wlr_output, struct kiwmi_server *server) -{ - struct kiwmi_output *output = calloc(1, sizeof(*output)); - if (!output) { - return NULL; - } - - output->wlr_output = wlr_output; - output->server = server; - - output->frame.notify = output_frame_notify; - wl_signal_add(&wlr_output->events.frame, &output->frame); - - output->destroy.notify = output_destroy_notify; - wl_signal_add(&wlr_output->events.destroy, &output->destroy); - - return output; -} - static void output_frame_notify(struct wl_listener *listener, void *data) { @@ -70,3 +47,23 @@ output_destroy_notify(struct wl_listener *listener, void *UNUSED(data)) free(output); } + +struct kiwmi_output * +output_create(struct wlr_output *wlr_output, struct kiwmi_server *server) +{ + struct kiwmi_output *output = calloc(1, sizeof(*output)); + if (!output) { + return NULL; + } + + output->wlr_output = wlr_output; + output->server = server; + + output->frame.notify = output_frame_notify; + wl_signal_add(&wlr_output->events.frame, &output->frame); + + output->destroy.notify = output_destroy_notify; + wl_signal_add(&wlr_output->events.destroy, &output->destroy); + + return output; +}