diff options
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index a650665f..16183870 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -243,8 +243,8 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { | |||
243 | soutput->last_frame = now; | 243 | soutput->last_frame = now; |
244 | } | 244 | } |
245 | 245 | ||
246 | void output_add_notify(struct wl_listener *listener, void *data) { | 246 | void handle_new_output(struct wl_listener *listener, void *data) { |
247 | struct sway_server *server = wl_container_of(listener, server, output_add); | 247 | struct sway_server *server = wl_container_of(listener, server, new_output); |
248 | struct wlr_output *wlr_output = data; | 248 | struct wlr_output *wlr_output = data; |
249 | wlr_log(L_DEBUG, "New output %p: %s", wlr_output, wlr_output->name); | 249 | wlr_log(L_DEBUG, "New output %p: %s", wlr_output, wlr_output->name); |
250 | 250 | ||
@@ -269,12 +269,14 @@ void output_add_notify(struct wl_listener *listener, void *data) { | |||
269 | 269 | ||
270 | sway_input_manager_configure_xcursor(input_manager); | 270 | sway_input_manager_configure_xcursor(input_manager); |
271 | 271 | ||
272 | output->frame.notify = output_frame_notify; | ||
273 | wl_signal_add(&wlr_output->events.frame, &output->frame); | 272 | wl_signal_add(&wlr_output->events.frame, &output->frame); |
273 | output->frame.notify = output_frame_notify; | ||
274 | |||
275 | wl_signal_add(&wlr_output->events.destroy, &output->output_destroy); | ||
276 | output->output_destroy.notify = handle_output_destroy; | ||
274 | } | 277 | } |
275 | 278 | ||
276 | void output_remove_notify(struct wl_listener *listener, void *data) { | 279 | void handle_output_destroy(struct wl_listener *listener, void *data) { |
277 | struct sway_server *server = wl_container_of(listener, server, output_remove); | ||
278 | struct wlr_output *wlr_output = data; | 280 | struct wlr_output *wlr_output = data; |
279 | wlr_log(L_DEBUG, "Output %p %s removed", wlr_output, wlr_output->name); | 281 | wlr_log(L_DEBUG, "Output %p %s removed", wlr_output, wlr_output->name); |
280 | 282 | ||