Skip to content

core: Store output change set properties using std::optional

Currently, we take the snapshot of the output state when creating an OutputChangeSet. However, this is potentially racy, e.g. if you want to change only the transform but the change set contains old position, the output will end up with wrong position.

Another advantage of std::optional is that it gives you slight idea what output properties are actually going to be changed. At the moment, we don't take the advantage of this, but I see a usecase for animating dpms mode changes, etc.

Finally, it makes OutputChangeSet less boilerplaty, e.g. noop OutputChangeSet can be created by calling std::make_shared()

Merge request reports