Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55303

QtWaylandCompositor doesn't handle HiDPI properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.0 Beta 2
    • 5.7.0
    • QPA: Wayland
    • None

    Description

      This has been discovered with a real world compositor on a MBP 13".
      The compositor sets AA_EnableHighDpiScaling and the platform plugin sets devicePixelRatio to 2.0

      In this scenario the compositor will create WaylandOutputs with a scale factor of 2 because that's what the screen is. This will make clients set a buffer scale of 2.

      However QWaylandQuickItem::updateSize() will use output scale factor / surface buffer scale to scale down the size but this won't work since both scales are 2, hence the window appears to be twice the size as it should be.

      The scaling error probably comes from tests with the pure-qml example and the QT_SCALE_FACTOR=2 environment variable and applications with QT_SCALE_FACTOR=2 too, however the example program is naive and sets the output scale factor to 1, which is not what you would expect when running on a Retina display.

      Attachments

        For Gerrit Dashboard: QTBUG-55303
        # Subject Branch Project Status CR V

        Activity

          People

            giucam Giulio Camuffo
            plfiorini Pier Luigi Fiorini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes