Not sure why statics weren't on top
This commit is contained in:
parent
cde9124bb3
commit
1e01e3f74e
1 changed files with 20 additions and 23 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue