Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_output.c:
if (output->pending_flags & WAYLAND_OUTPUT_CHANGED_MODES) { - RB_FOR_EACH_ENTRY(mode, &output->pending.modes, struct wayland_output_mode, entry) - { - wayland_output_state_add_mode(&output->current, - mode->width, mode->height, mode->refresh, - mode == output->pending.current_mode); - } - rb_destroy(&output->pending.modes, wayland_output_mode_free_rb, NULL); + rb_destroy(&output->current.modes, wayland_output_mode_free_rb, NULL);
You don't really need a rb_tree anymore as you're using a hardcoded and already sorted mode list. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4947#note_59273