aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-14 14:51:51 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-14 14:51:51 -0500
commit7dfbf06de9a5659d4c73edf53c38ee07068a2877 (patch)
treeccf6d0147d57fd65bc742d8d576e01d2ab2f8249 /sway/desktop/output.c
parentinput device destroy (diff)
downloadsway-7dfbf06de9a5659d4c73edf53c38ee07068a2877.tar.gz
sway-7dfbf06de9a5659d4c73edf53c38ee07068a2877.tar.zst
sway-7dfbf06de9a5659d4c73edf53c38ee07068a2877.zip
output destroy
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c12
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
246void output_add_notify(struct wl_listener *listener, void *data) { 246void 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
276void output_remove_notify(struct wl_listener *listener, void *data) { 279void 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