<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/120823/">https://git.reviewboard.kde.org/r/120823/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On November 2nd, 2014, 11:42 a.m. UTC, <b>Àlex Fiestas</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Things might have changed since we wrote this code, but according to the commit that introduced this code: 9d7991788fff the current code is valid.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The situation was (is?):</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Lets say the current Screen size is 3200x1080  composied of two outputs:
1: 1280x800+1920+0
2: 1920x1080+0+0</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In theory for removing output 2 we would need to:
-Disable screen 2 (detach output from CRTC)
-Move screen 1 to position 0,0
-Resize screen to 1280x800 (size of output 1)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What we found out (confirmed by some other tools written in the same way) is that we need to disable the CRTC of otuput 1 as well because previous X position is outside the new screen size (it was 1920, now screen size is 1280).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch will make the code never enter into the conditional since the "newSize" is computed out of the "configuration to be set", so X/Y will never be a bigger number than newSize.width/height.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Besides if this is still needed or not, I don't get why Qt is crashing, can you explain a bit more about that?</p></pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Qt crashes because, at some point we get 0 screens on. And Qt doesn't handle it well. David looked into it AFAIK, and he wasn't all that successful.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Anyway, I'll rethink the patch then. It seems like I looked at it all wrong.</p></pre>
<br />










<p>- Aleix</p>


<br />
<p>On October 27th, 2014, 5:09 p.m. UTC, Aleix Pol Gonzalez wrote:</p>









<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Solid, Àlex Fiestas and Dan Vrátil.</div>
<div>By Aleix Pol Gonzalez.</div>


<p style="color: grey;"><i>Updated Oct. 27, 2014, 5:09 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
libkscreen
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So far, XRandRConfig::applyKScreenConfig was using the previous screen position which wouldn't agree with the screen computed by screenSize(config) (xrandrconfig.cpp:166). This would try to remove the screen even if it was not needed.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This was a problem because in my system where I had 1920x1080+1280+0 and 1280x800+0+280. If I removed the first one, then both were removed and then the small one added back in, then Qt will collapse because we were requesting 1280x800+0+0, while it was in 1280x800+0+280.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">We managed to reproduce the bug consistently in David and my system up until we figured out why Qt was crashing (which will receive bug reports and patches anyway).</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>backends/xrandr/xrandrconfig.cpp <span style="color: grey">(3b37add)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/120823/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>








  </div>
 </body>
</html>