From 4cc5bdc4d1c23177532d9d075bd9896b7fe4b5a6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 18 Aug 2022 10:56:18 +0200 Subject: [PATCH] backend/wayland: drop output_set_custom_mode() It's an unnecessary wrapper. --- backend/wayland/output.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 28fa5e99..f01263b7 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -107,12 +107,6 @@ static const struct wp_presentation_feedback_listener .discarded = presentation_feedback_handle_discarded, }; -static bool output_set_custom_mode(struct wlr_output *wlr_output, - int32_t width, int32_t height, int32_t refresh) { - wlr_output_update_custom_mode(wlr_output, width, height, 0); - return true; -} - void destroy_wl_buffer(struct wlr_wl_buffer *buffer) { if (buffer == NULL) { return; @@ -284,12 +278,8 @@ static bool output_commit(struct wlr_output *wlr_output, } if (state->committed & WLR_OUTPUT_STATE_MODE) { - if (!output_set_custom_mode(wlr_output, - state->custom_mode.width, - state->custom_mode.height, - state->custom_mode.refresh)) { - return false; - } + wlr_output_update_custom_mode(wlr_output, + state->custom_mode.width, state->custom_mode.height, 0); } if (state->committed & WLR_OUTPUT_STATE_BUFFER) { @@ -497,8 +487,9 @@ static void xdg_toplevel_handle_configure(void *data, if (width == 0 || height == 0) { return; } - // loop over states for maximized etc? - output_set_custom_mode(&output->wlr_output, width, height, 0); + + // TODO: loop over states for maximized etc? + wlr_output_update_custom_mode(&output->wlr_output, width, height, 0); } static void xdg_toplevel_handle_close(void *data,