aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-02-14 14:51:51 -0500
committerTony Crisci <tony@dubstepdish.com>2018-02-14 14:51:51 -0500
commit7dfbf06de9a5659d4c73edf53c38ee07068a2877 (patch)
treeccf6d0147d57fd65bc742d8d576e01d2ab2f8249 /sway/desktop
parent06c71f115bb0632ef1e75d881d509665198e1eef (diff)
output destroy
Diffstat (limited to 'sway/desktop')
-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) {
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);
@@ -269,12 +269,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);