Skip to content
Snippets Groups Projects
Commit ef8a173c authored by Mark Bolhuis's avatar Mark Bolhuis
Browse files

types/wlr_xdg_output_v1: Fix wl_output.done bug.

If the client binds to version 3 of zxdg_output_v1 and version 1 of
wl_output no wl_output.done event is emitted [1].

Add a version check to output_manager_handle_get_xdg_output so that no
event is emitted and prevents clients bound to version 1 of wl_output
from crashing.

[1]: wayland/wayland-protocols#81
parent c2359d03
No related branches found
No related tags found
No related merge requests found
Pipeline #664242 passed
......@@ -140,7 +140,10 @@ static void output_manager_handle_get_xdg_output(struct wl_client *client,
output_send_details(xdg_output, xdg_output_resource);
wl_output_send_done(output_resource);
version = wl_resource_get_version(output_resource);
if (version >= WL_OUTPUT_DONE_SINCE_VERSION) {
wl_output_send_done(output_resource);
}
}
static const struct zxdg_output_manager_v1_interface
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment