backend-vnc: set flags of current mode instead of template

vnc_ensure_matching_mode() does not transfer flags from init_mode.
Set flags on the returned mode instead.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Philipp Zabel 2022-12-03 11:02:32 +01:00 committed by Philipp Zabel
parent 853eb7327f
commit 635aa225c6
1 changed files with 1 additions and 1 deletions

View File

@ -891,12 +891,12 @@ vnc_output_set_size(struct weston_output *base, int width, int height)
wl_list_init(&output->peers);
init_mode.flags = WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED;
init_mode.width = width;
init_mode.height = height;
init_mode.refresh = backend->vnc_monitor_refresh_rate;
current_mode = vnc_ensure_matching_mode(&output->base, &init_mode);
current_mode->flags = WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED;
output->base.current_mode = output->base.native_mode = current_mode;