aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-08-18 10:56:18 +0200
committerSimon Ser <contact@emersion.fr>2022-09-08 14:18:40 +0200
commit4cc5bdc4d1c23177532d9d075bd9896b7fe4b5a6 (patch)
treed1db0b842527d67622c6b249ea9a9ee1adc735bd
parent0cff058f38f2121475ca4d298e7f8c3b7938df30 (diff)
backend/wayland: drop output_set_custom_mode()
It's an unnecessary wrapper.
-rw-r--r--backend/wayland/output.c19
1 files 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,