<table><tr><td style="">dvratil created this revision.<br />dvratil added reviewers: sebas, davidedmundson.<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/D9463" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Add support for reading and updating output scaling. Unlike Wayland,<br />
XRandR supports non-integer scaling factors so a new Config feature<br />
has been introduced for XRandR to be able to tell clients that it<br />
supports non-integer scaling factors. The scaling is represented as<br />
a QTransformation matrix on CRTC and is applied before RRSetCrtcConfig<br />
call.</p>

<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);"></pre></div>

<p>This becomes useful for people who combine HiDPI and non-HiDPI screens.<br />
In my case, I found out that the only really working solution is to not scale<br />
the applications  (since that does not work as you move windows between<br />
screens), but instead of scale the non-HiDPI screen in XRandR by 1.5, thus<br />
achieving a similarily-sized windows on both screens.  To make this persistent,<br />
KScreen needs to remember not just resolution and rotation of each screen,<br />
but also their scale, so that it can be applied during session start.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Set scaling on one screen to 1.5</p>

<p>xrandr --output DVI-I-1 --scale 1.5x1.5</p>

<p>Logout, log back in, observe KScreen has correctly restored screen configuration, including the scaling.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R110 KScreen Library</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9463" rel="noreferrer">https://phabricator.kde.org/D9463</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
backends/xcbwrapper.h<br />
backends/xrandr/xrandr.cpp<br />
backends/xrandr/xrandr.h<br />
backends/xrandr/xrandrconfig.cpp<br />
backends/xrandr/xrandrcrtc.cpp<br />
backends/xrandr/xrandrcrtc.h<br />
backends/xrandr/xrandroutput.cpp<br />
src/config.h</div></div></div><br /><div><strong>To: </strong>dvratil, sebas, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>