fix isOutputRedundant logic

Authored by mart on Jan 27 2017, 3:11 PM.

Description

fix isOutputRedundant logic

Summary:
isOutputRedundant badly failed when two screens had
the exact same geometry (that should be, the base
case for "cloning" screens.
now the logic is:
a screen is redundant if:

  • its geometry is contained in another one
  • if their resolutions are different, the "biggest" one wins
  • if they have the same geometry, the one with the lowest id wins (arbitrary, but gives reproducible behavior and makes the primary

BUG:375507

Test Plan:
tested with two screens:

  • overlapping, same resolution: the lowest id (0, the primary) wins, the other one doesn't get a view
  • overlapping, different resolutions: the biggest one wins
  • not overlapping: both get a view

Reviewers: sebas, Plasma, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D4309

Details

Committed
martJan 27 2017, 3:43 PM
Reviewer
Plasma
Differential Revision
D4309: fix isOutputRedundant logic
Parents
R120:2212c4241739: Remove unneeded QString() call
Branches
Unknown
Tags
Unknown