backend/wayland: drop output_set_custom_mode()

It's an unnecessary wrapper.
This commit is contained in:
Simon Ser 2022-08-18 10:56:18 +02:00
parent 0cff058f38
commit 4cc5bdc4d1

View file

@ -107,12 +107,6 @@ static const struct wp_presentation_feedback_listener
.discarded = presentation_feedback_handle_discarded, .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) { void destroy_wl_buffer(struct wlr_wl_buffer *buffer) {
if (buffer == NULL) { if (buffer == NULL) {
return; return;
@ -284,12 +278,8 @@ static bool output_commit(struct wlr_output *wlr_output,
} }
if (state->committed & WLR_OUTPUT_STATE_MODE) { if (state->committed & WLR_OUTPUT_STATE_MODE) {
if (!output_set_custom_mode(wlr_output, wlr_output_update_custom_mode(wlr_output,
state->custom_mode.width, state->custom_mode.width, state->custom_mode.height, 0);
state->custom_mode.height,
state->custom_mode.refresh)) {
return false;
}
} }
if (state->committed & WLR_OUTPUT_STATE_BUFFER) { if (state->committed & WLR_OUTPUT_STATE_BUFFER) {
@ -497,8 +487,9 @@ static void xdg_toplevel_handle_configure(void *data,
if (width == 0 || height == 0) { if (width == 0 || height == 0) {
return; 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, static void xdg_toplevel_handle_close(void *data,