From d3626efe5ef96f056f72f320a6487947ff22f8d9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 31 Jul 2023 10:07:17 +0200 Subject: desktop/output: drop handle_mode() We already perform the exact same logic on transform/scale change. --- sway/desktop/output.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index b5993d23..f052e6f4 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -926,18 +926,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) { update_output_manager_config(server); } -static void handle_mode(struct sway_output *output) { - if (!output->enabled) { - return; - } - - arrange_layers(output); - arrange_output(output); - transaction_commit_dirty(); - - update_output_manager_config(output->server); -} - static void update_textures(struct sway_container *con, void *data) { container_update_title_textures(con); container_update_marks_textures(con); @@ -953,10 +941,6 @@ static void handle_commit(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, commit); struct wlr_output_event_commit *event = data; - if (event->committed & WLR_OUTPUT_STATE_MODE) { - handle_mode(output); - } - if (!output->enabled) { return; } @@ -966,7 +950,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { output_for_each_surface(output, update_output_scale_iterator, NULL); } - if (event->committed & (WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE)) { + if (event->committed & (WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE)) { arrange_layers(output); arrange_output(output); transaction_commit_dirty(); -- cgit v1.2.3-54-g00ecf