Fix setting primary connector if primary output changed

Authored by hoffmannrobert on Aug 30 2018, 11:21 PM.

Description

Fix setting primary connector if primary output changed

Summary:
If a user logged in with one screen connected plugs in
a second screen, which becomes the new primary screen,
this screen would stay black or behave weird.

Unplugging the screen again would mess up plasmashell.

Added to ScreenPool::setPrimaryConnector():
In the case primary output changed m_idForConnector
doesn't contain the new primary, so a screen mapping
is created for it.

Test Plan:
Testing on virtualbox or vmware player seems impossible, because
these don't allow disabling the first display (VGA-1) and booting
with the second (VGA-2) only.

  1. Boot machine with one screen connected to HDMI-3 (primary output).
  2. Log in
  3. Plug in second screen to HDMI-2:

--> primary output changes from HDMI-3 to HDMI-2

  1. OSD appears: extend to right

--> Without this patch, the new screen (HDMI-2) would stay blank.
--> With this patch applied, the screen content moves to the new

second screen.
  1. Unplug second screen (HDMI-2)

--> Without this patch, the background would get black, control panel

would disappear, could only be restored by restart of plasmashell

--> With this patch applied, screen content moves to the right and

works

Reviewers: Plasma, mart, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: davidedmundson, ngraham, plasma-devel

Tags: Plasma

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

Details

Committed
ngrahamAug 30 2018, 11:22 PM
Reviewer
Plasma
Differential Revision
D13853: Fix setting primary connector if primary output changed
Parents
R120:26050397cbaf: Allow wallpaper slideshow blur config to persist
Branches
Unknown
Tags
Unknown