[Kde-hardware-devel] Review Request 120823: Fix KScreen when disconnecting a screen

Àlex Fiestas afiestas at kde.org
Sun Nov 2 11:42:08 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120823/#review69668
-----------------------------------------------------------


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?

- Àlex Fiestas


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/20141102/be3b362c/attachment.html>


More information about the Kde-hardware-devel mailing list