Correctly handle when a new primary screen displaces the old

Authored by mart on Apr 6 2017, 4:57 PM.

Description

Correctly handle when a new primary screen displaces the old

Summary:
this is for the following setup:
the primary screen is at position 0,0 and gets disconnected.
the other screen will be moved at 0,0 and becomes primary

the screen is reconnected, the events arrive in the followin order:

  1. a new screen gets added, at 0,0 position (not primary yet, it may be markedredundant)
  2. the screen becomes primary, both screens still at 0,0
  3. the old screen gets moved out of the way

in the end result none of the two need to be redundant.
adding the old one in the redundant list, will cause reconsideroutputs
to consider it and create a view for it.

Test Plan: added and removed sevaral times a primary screen at 0,0

Reviewers: Plasma, broulik, sebas

Subscribers: plasma-devel

Tags: Plasma

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