Not sure why statics weren't on top

This commit is contained in:
buffet 2019-03-07 19:38:50 +01:00
parent ec9ad3b3b1
commit 33bfb59b62

View file

@ -15,29 +15,6 @@
#include "kiwmi/server.h" #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 static void
output_frame_notify(struct wl_listener *listener, void *data) 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); 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;
}