• Laszlo Agocs's avatar
    Fix disfunctional QQuickRenderControl with multiple screens · 9b965f3f
    Laszlo Agocs authored
    
    Having a retina and non-retina screen connected resulted in getting
    no output from QQuickRenderControl and QQuickWidget on the
    non-retina screen.
    
    This is caused by the fact that Quick is blindly calling
    QWindow::devicePixelRatio(). This approach is wrong when using
    QQuickRenderControl since the QQuickWindow does not have an actual
    native window and so devicePixelRatio() merely returns some default value
    which will definitely be wrong for one of the screens.
    
    The patch fixes the problem by introducing
    QQuickWindow::effectiveDevicePixelRatio(), which, via
    QQuickRenderControl::renderWindowFor, supports the redirected case too.
    
    Task-number: QTBUG-42114
    Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b
    Reviewed-by: default avatarPaul Olav Tvete <paul.tvete@digia.com>
    9b965f3f