<table><tr><td style="">hoffmannrobert created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.<br />hoffmannrobert requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13853">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If a user logged in with one screen connected plugs in<br />
a second screen, which becomes the new primary screen,<br />
this screen would stay black or behave weird.</p>

<p>Unplugging the screen again would mess up plasmashell.</p>

<p>Added to ScreenPool::setPrimaryConnector():<br />
In the case primary output changed m_idForConnector<br />
doesn't contain the new primary, so a screen mapping<br />
is created for it.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Testing on virtualbox or vmware player seems impossible, because<br />
these don't allow disabling the first display (VGA-1) and booting<br />
with the second (VGA-2) only.</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Boot machine with one screen connected to HDMI-3 (primary output).</li>
<li class="remarkup-list-item">Log in</li>
<li class="remarkup-list-item">Plug in second screen to HDMI-2:</li>
</ol>

<h2 class="remarkup-header">> primary output changes from HDMI-3 to HDMI-2</h2>

<ol class="remarkup-list" start="4">
<li class="remarkup-list-item">OSD appears: extend to right</li>
</ol>

<h2 class="remarkup-header">> Without this patch, the new screen (HDMI-2) would stay blank.</h2>

<h2 class="remarkup-header">> With this patch applied, the screen content moves to the new</h2>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">second screen.</pre></div>

<ol class="remarkup-list" start="5">
<li class="remarkup-list-item">Unplug second screen (HDMI-2)</li>
</ol>

<h2 class="remarkup-header">> Without this patch, the background would get black, control panel</h2>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">would disappear, could only be restored by restart of plasmashell</pre></div>

<h2 class="remarkup-header">> With this patch applied, screen content moves to the right and</h2>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">works</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13853">https://phabricator.kde.org/D13853</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>shell/screenpool.cpp</div></div></div><br /><div><strong>To: </strong>hoffmannrobert<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>