Skip to content

Fix algorithm for common sizes in Generator::cloneScreens

Fabian Vogt requested to merge work/fvogt/bug442822 into master

The algorithm iterates all outputs and collects the intersection of all supported sizes. To fill the set initially, it assigns the current sizes if the preliminary result is empty, but this condition can also be true if the previous intersection resulted in an empty set. This is the case for instance when using 3 monitors, of which the second one doesn't have any modes in common with the first (e.g. rotation) and without this fix, it would return all sizes of the third monitor instead of an empty set.

Avoid this by giving up early when there's no intersection left.

BUG: 442822

Merge request reports