diff options
author | Simon Ser <contact@emersion.fr> | 2023-01-30 14:27:05 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-02-02 17:24:37 +0000 |
commit | afa1a7f4ba9b98d43fc69d1438a48dc08d600b91 (patch) | |
tree | 1088b3a91ac2b576c09d6bc80216bf6b7f836bc5 | |
parent | 2e49fa1a0aa9af87a1f8152d5518e99a7ec32dbb (diff) |
backend/wayland: update output mode after commit is done
Do not update the output mode if the commit failed in one of the
error codepaths.
-rw-r--r-- | backend/wayland/output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 0a256890..152c879f 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -287,11 +287,6 @@ static bool output_commit(struct wlr_output *wlr_output, return false; } - if (state->committed & WLR_OUTPUT_STATE_MODE) { - wlr_output_update_custom_mode(wlr_output, - state->custom_mode.width, state->custom_mode.height, 0); - } - if (state->committed & WLR_OUTPUT_STATE_BUFFER) { struct wp_presentation_feedback *wp_feedback = NULL; if (output->backend->presentation != NULL) { @@ -360,6 +355,11 @@ static bool output_commit(struct wlr_output *wlr_output, wl_display_flush(output->backend->remote_display); + if (state->committed & WLR_OUTPUT_STATE_MODE) { + wlr_output_update_custom_mode(wlr_output, + state->custom_mode.width, state->custom_mode.height, 0); + } + return true; } |