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.
This commit is contained in:
Roman Gilg 2020-10-01 14:32:57 +02:00 committed by Simon Ser
parent 8dec751a6d
commit 86c0b9986b
1 changed files with 3 additions and 0 deletions

View File

@ -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) {