From 2f7ab094d4ef8711ee418b5a06f566a3e7a91cf3 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sat, 30 Sep 2023 13:39:53 +0200 Subject: [PATCH] output: Remove output mode handler This is replaced by monitoring for WLR_OUTPUT_STATE_MODE on commit. --- output.c | 18 +----------------- output.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/output.c b/output.c index 733e194..599d6ad 100644 --- a/output.c +++ b/output.c @@ -42,7 +42,7 @@ #endif #define OUTPUT_CONFIG_UPDATED \ - (WLR_OUTPUT_STATE_ENABLED | WLR_OUTPUT_STATE_SCALE | WLR_OUTPUT_STATE_TRANSFORM | \ + (WLR_OUTPUT_STATE_ENABLED | WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_SCALE | WLR_OUTPUT_STATE_TRANSFORM | \ WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) static void @@ -191,19 +191,6 @@ handle_output_commit(struct wl_listener *listener, void *data) } } -static void -handle_output_mode(struct wl_listener *listener, void *data) -{ - struct cg_output *output = wl_container_of(listener, output, mode); - - if (!output->wlr_output->enabled) { - return; - } - - view_position_all(output->server); - update_output_manager_config(output->server); -} - void handle_output_layout_change(struct wl_listener *listener, void *data) { @@ -237,7 +224,6 @@ output_destroy(struct cg_output *output) wl_list_remove(&output->destroy.link); wl_list_remove(&output->commit.link); - wl_list_remove(&output->mode.link); wl_list_remove(&output->frame.link); wl_list_remove(&output->link); @@ -286,8 +272,6 @@ handle_new_output(struct wl_listener *listener, void *data) output->commit.notify = handle_output_commit; wl_signal_add(&wlr_output->events.commit, &output->commit); - output->mode.notify = handle_output_mode; - wl_signal_add(&wlr_output->events.mode, &output->mode); output->destroy.notify = handle_output_destroy; wl_signal_add(&wlr_output->events.destroy, &output->destroy); output->frame.notify = handle_output_frame; diff --git a/output.h b/output.h index 780930e..a3a1a4c 100644 --- a/output.h +++ b/output.h @@ -13,7 +13,6 @@ struct cg_output { struct wlr_scene_output *scene_output; struct wl_listener commit; - struct wl_listener mode; struct wl_listener destroy; struct wl_listener frame;