<table><tr><td style="">sebas created this revision.<br />sebas added a reviewer: Plasma.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.</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/D2496" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When setting a config, outputs may fall outside of the virtual screen<br />
layout. This can happen when, for example, a single screen is enabled<br />
and its position is not zero. The screen size is a unified rect of the<br />
enabled and connected outputs, which doesn't necessarily sit at 0,0<br />
initially. By normalizing the output position, we avoid this pitfall.</p>
<p>Especially the xrandr backend struggles with this, since it will disable<br />
outputs falling outside of the virtual screen, and it does so after<br />
policy checks have happened, so in the worst (and actually fairly<br />
common) case, it will disable the only remaining output, leading to ...</p>
<p>BUG:367490</p>
<p>The reason to do the normalization in SetConfigOperation right before<br />
the config is passed to the backends to apply is to catch this<br />
inconsistency problem with configs at a common entry-point. Doing it in<br />
the library, rather than in the xrandr backend also means that we can<br />
autotest it -- we can't sensible do that with the xrandr backend.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">manually tested by enabling the left / top most output of two actual outputs, this failed before and left all outputs disabled, with this patch, it works as expected</li>
<li class="remarkup-list-item">added autotest to make sure the normalization works</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>rLIBKSCREEN KScreen Library</div></div></div><br /><div><strong>BRANCH</strong><div><div>sebas/positionnormalization</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2496" rel="noreferrer">https://phabricator.kde.org/D2496</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/testscreenconfig.cpp<br />
src/setconfigoperation.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>sebas, Plasma<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>