EDID matching for output stack #1325
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EDID matching in #1252, but for output stacks.
It seems better to add here first (where it isn't persisted) and overhaul the on-disk format for output configuration along with pinned workspace persisting, which will also need this.
For persistent workspaces, I think it makes sense not to persist the whole output stack, but only the last output a workspace was explicitly placed on (where it was created, or moved to by the user). Though there may be edge cases where this is undesirable and confusing. (Which is also a potential problem for any other alternative.)
So when a workspace is moved explictly by the user, the output stack is cleared. And the earliest output in the stack is where it was placed explictly.
Getting the behaviors right when multiple displays have the same edid information is harder.
I had the idea that
Workspaces::add_output
should check if the edid matches an existing output on a different connector, then try to move workspaces that were explictly assigned to that output with that connector, though the way.matches()
is used for truncating the output stack will need to change too...