Skip to content

color: avoid tracking wl_output resource

Pekka Paalanen requested to merge pq/wayland-protocols:mr/detangle into color

The previous wording implied that compositors need to track the association between the wl_output wl_resource and the wp_color_management_output_v1 wl_resource in order to make the latter inert and trigger protocol errors after the former has been destroyed by the client. This seems unnecessary.

Instead, tie the wp_color_management_output_v1 object to the underlying output. This completely removes the case of a protocol error. It does allow the slightly strange thing of a client having a wp_color_management_output_v1 object but no corresponding wl_output object, but that does not seem to be a problem in practice. The client will lack the wl_output.done event on image_description_changed.

This is unlike wl_surface / wp_color_management_surface_v1. When a client destroys a wl_surface, the underlying surface is also destroyed for all intents and purposes. Outputs OTOH live by the compositor, and destroying a wl_output object makes no difference.


Pointed out by @leandrohrb during implementation.

Merge request reports

Loading