[Kde-hardware-devel] Review Request 120823: Fix KScreen when disconnecting a screen
Aleix Pol Gonzalez
aleixpol at kde.org
Tue Nov 4 11:46:54 UTC 2014
> On Nov. 2, 2014, 11:42 a.m., Àlex Fiestas wrote:
> > Things might have changed since we wrote this code, but according to the commit that introduced this code: 9d7991788fff the current code is valid.
> >
> > The situation was (is?):
> >
> > Lets say the current Screen size is 3200x1080 composied of two outputs:
> > 1: 1280x800+1920+0
> > 2: 1920x1080+0+0
> >
> > 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)
> >
> > 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).
> >
> > 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.
> >
> > Besides if this is still needed or not, I don't get why Qt is crashing, can you explain a bit more about that?
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.
Anyway, I'll rethink the patch then. It seems like I looked at it all wrong.
- Aleix
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120823/#review69668
-----------------------------------------------------------
On Oct. 27, 2014, 5:09 p.m., Aleix Pol Gonzalez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120823/
> -----------------------------------------------------------
>
> (Updated Oct. 27, 2014, 5:09 p.m.)
>
>
> Review request for Solid, Àlex Fiestas and Dan Vrátil.
>
>
> Repository: libkscreen
>
>
> Description
> -------
>
> 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.
>
> 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.
>
>
> Diffs
> -----
>
> backends/xrandr/xrandrconfig.cpp 3b37add
>
> Diff: https://git.reviewboard.kde.org/r/120823/diff/
>
>
> Testing
> -------
>
> 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).
>
>
> Thanks,
>
> Aleix Pol Gonzalez
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20141104/30853926/attachment.html>
More information about the Kde-hardware-devel
mailing list