Incorrect feedback commit sequence in wayland backend.
Hi,
Running sway (1.4 with wlroots 0.10.0) in gnome on top of mutter (that's simply one of my test configs), which doesn't support wp_presentation feedback protocol, results in the wlroots sending a fake feedback. However, this fake feedback has a commit_seq higher by 1 than the actual output's commit [1]. That is, the wlr_presentation_feedback receives a feedback with commit_seq higher than the actual output_commit_seq[2] if the feedback is faked, which actually means that a feedback is sent earlier than actual commit happens. This also results in growing in a number of wp_presentation_feedback objects, which are never "fired" (except the very first feedback, which is discarded).
I haven't had a chance to test the master build, but if I'm not mistaken by looking at the code, the issue is in the master as well (the links to the code are given for the master branch).
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/backend/wayland/output.c#L345
[2] https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/types/wlr_presentation_time.c#L289