<table><tr><td style="">nowicki created this revision.<br />nowicki added a project: KWin.<br />Restricted Application edited projects, added Plasma; removed KWin.<br />Restricted Application added a subscriber: KWin.
</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/D5249" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>I have been using my laptop to display content on a projector and sometimes I have encountered some cheap/broken device that either cannot be set-up properly or it is fixed to the wall with no way of doing any adjustments. This led me to the idea to do this transformation in software. I have found that KWin - due to its nice architecture - is a good place to hook up into.</p>
<p>I am aware that at least on X (not sure about Wayland - never been there yet) it is possible to configure a transform matrix with a specific output using XRandr. Unfortunately this seems to be rarely used and thus broken on all drivers I have attempted to use it (nVidia proprietary, amdgpu, qemu/qxl).</p>
<p>This patch is a working concept, which I am aware has some shortcomings. Window frames are rendered with ugly aliasing and interaction with other effects can sometimes lead to funny results. Nevertheless if you consider that it will be mostly used to display a full-screen window with a presentation, it does the job quite nicely.</p>
<p>The configuration is very basic ATM - a DBus interface is exposed to set the target rectangle on a given output. This is because I am not exactly sure where the configuration of this effect should be done. From KWin architecture POV it should receive its own config window. However from UX POV it might be better to hook it up with the KScreen KCM, so that the correction can be adjusted per display and optionally be stored along with the KScreen configuration.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5249" rel="noreferrer">https://phabricator.kde.org/D5249</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/mock_effectshandler.h<br />
effects.cpp<br />
effects.h<br />
effects/CMakeLists.txt<br />
effects/effect_builtins.cpp<br />
effects/effect_builtins.h<br />
effects/projector/CMakeLists.txt<br />
effects/projector/org.kde.kwin.ProjectorEffect.xml<br />
effects/projector/projector.cpp<br />
effects/projector/projector.h<br />
libkwineffects/kwineffects.h</div></div></div><br /><div><strong>To: </strong>nowicki, Plasma, graesslin<br /><strong>Cc: </strong>kwin, plasma-devel, KWin, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>