fix build for latest api

This commit is contained in:
Tony Crisci 2018-02-14 15:08:10 -05:00
commit 083e11ac7c
8 changed files with 51 additions and 47 deletions

View file

@ -216,11 +216,12 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
struct sway_output *soutput = wl_container_of(listener, soutput, frame);
struct wlr_output *wlr_output = data;
struct sway_server *server = soutput->server;
float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f};
struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
wlr_renderer_clear(renderer, &clear_color);
wlr_renderer_clear(renderer, &clear_color);
int buffer_age = -1;
wlr_output_make_current(wlr_output, &buffer_age);
wlr_renderer_begin(server->renderer, wlr_output);
@ -254,8 +255,8 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
soutput->last_frame = now;
}
void output_add_notify(struct wl_listener *listener, void *data) {
struct sway_server *server = wl_container_of(listener, server, output_add);
void handle_new_output(struct wl_listener *listener, void *data) {
struct sway_server *server = wl_container_of(listener, server, new_output);
struct wlr_output *wlr_output = data;
wlr_log(L_DEBUG, "New output %p: %s", wlr_output, wlr_output->name);
@ -280,12 +281,14 @@ void output_add_notify(struct wl_listener *listener, void *data) {
sway_input_manager_configure_xcursor(input_manager);
output->frame.notify = output_frame_notify;
wl_signal_add(&wlr_output->events.frame, &output->frame);
output->frame.notify = output_frame_notify;
wl_signal_add(&wlr_output->events.destroy, &output->output_destroy);
output->output_destroy.notify = handle_output_destroy;
}
void output_remove_notify(struct wl_listener *listener, void *data) {
struct sway_server *server = wl_container_of(listener, server, output_remove);
void handle_output_destroy(struct wl_listener *listener, void *data) {
struct wlr_output *wlr_output = data;
wlr_log(L_DEBUG, "Output %p %s removed", wlr_output, wlr_output->name);