diff --git a/types/wlr_xdg_output_v1.c b/types/wlr_xdg_output_v1.c index 062bf6e63..d030748d2 100644 --- a/types/wlr_xdg_output_v1.c +++ b/types/wlr_xdg_output_v1.c @@ -127,11 +127,11 @@ static void output_manager_handle_get_xdg_output(struct wl_client *client, wl_resource_get_link(xdg_output_resource)); // Name and description should only be sent once per output - uint32_t version = wl_resource_get_version(xdg_output_resource); - if (version >= ZXDG_OUTPUT_V1_NAME_SINCE_VERSION) { + uint32_t xdg_version = wl_resource_get_version(xdg_output_resource); + if (xdg_version >= ZXDG_OUTPUT_V1_NAME_SINCE_VERSION) { zxdg_output_v1_send_name(xdg_output_resource, output->name); } - if (version >= ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION && + if (xdg_version >= ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION && output->description != NULL) { zxdg_output_v1_send_description(xdg_output_resource, output->description); @@ -139,7 +139,11 @@ 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); + uint32_t wl_version = wl_resource_get_version(output_resource); + if (wl_version >= WL_OUTPUT_DONE_SINCE_VERSION && + xdg_version >= OUTPUT_DONE_DEPRECATED_SINCE_VERSION) { + wl_output_send_done(output_resource); + } } static const struct zxdg_output_manager_v1_interface