output-power-management: send zwlr_output_power_v1.failed on output destroy

From the event description:

This event indicates that the output power management mode control is no
longer valid. This can happen for a number of reasons, including:
<...>
- The output disappeared
This commit is contained in:
Kirill Primak 2024-08-01 15:24:20 +03:00
parent 42673a2821
commit de574ac098

View File

@ -46,6 +46,7 @@ static void output_power_handle_output_destroy(struct wl_listener *listener,
void *data) { void *data) {
struct wlr_output_power_v1 *output_power = struct wlr_output_power_v1 *output_power =
wl_container_of(listener, output_power, output_destroy_listener); wl_container_of(listener, output_power, output_destroy_listener);
zwlr_output_power_v1_send_failed(output_power->resource);
output_power_destroy(output_power); output_power_destroy(output_power);
} }