From 86c0b9986b82a477dea7e6029c0fe565dd7af429 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Thu, 1 Oct 2020 14:32:57 +0200 Subject: output-management-v1: send complete head state on enable change The data of a head is only sent when it is enabled. While the head was disabled data might have been changed. In this case clients were not informed about this change. A later enable change that does not also update the other data must still lead to the propagation of this data. Since we do not know what other data was changed while the head was disabled just send together with an enable change all current data. --- types/wlr_output_management_v1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/wlr_output_management_v1.c b/types/wlr_output_management_v1.c index ae20e0d7..728abee7 100644 --- a/types/wlr_output_management_v1.c +++ b/types/wlr_output_management_v1.c @@ -680,6 +680,9 @@ static void head_send_state(struct wlr_output_head_v1 *head, if (state & HEAD_STATE_ENABLED) { zwlr_output_head_v1_send_enabled(head_resource, head->state.enabled); + // On enabling we send all current data since clients have not been + // notified about potential data changes while the head was disabled. + state = HEAD_STATE_ALL; } if (!head->state.enabled) { -- cgit v1.2.3