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

Under wayland, devicePixelRatio can't get non-integer multiples of dpi.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.8
    • GUI: High-DPI
    • None
    • kde nano
    • Linux/Wayland

    Description

      Under wayland, devicePixelRatio can't get non-integer multiples of dpi, for example, I set the system's scaling factor to 1.25, but the wayland protocol reads wl_out_scale as 2, which is incorrect. https://doc.qt.io/qt-6/highdpi.html The documentation clearly says that QScreen scales to integers under wayland, does that mean that currently qt6.8 can't handle non-integer dpi?

       

       

      Partial log of wayland protocol :

       557837.498] {Default Queue} zwp_tablet_pad_v2#4278190082.path("")

      [ 557837.500] {Default Queue} zwp_tablet_pad_v2#4278190082.group(new id zwp_tablet_pad_group_v2#4278190083)

      [ 557837.502] {Default Queue} discarded zwp_tablet_pad_group_v2#4278190083.modes(0)

      [ 557837.503] {Default Queue} discarded zwp_tablet_pad_group_v2#4278190083.buttons(array[0])

      [ 557837.505] {Default Queue} discarded zwp_tablet_pad_group_v2#4278190083.done()

      [ 557837.506] {Default Queue} zwp_tablet_pad_v2#4278190082.done()

      [ 557837.508] {Default Queue} wl_callback#14.done(3708)

      [ 557837.510] {Default Queue} wl_output#16.mode(1, 2160, 1440, 60001)

      [ 557837.513] {Default Queue} wl_output#16.scale(2)

      [ 557837.515] {Default Queue} wl_output#16.geometry(0, 0, 275, 183, 0, "Chimei Innolux Corporation", "eDP-1-P130ZFA-BA1", 0)

      [ 557837.520] {Default Queue} wl_output#16.done()

      [ 557837.522] {Default Queue} zxdg_output_v1#17.logical_position(0, 0)

      [ 557837.524] {Default Queue} zxdg_output_v1#17.logical_size(1728, 1152)

      [ 557837.526] {Default Queue} zxdg_output_v1#17.name("eDP-1")

      [ 557837.528] {Default Queue} zxdg_output_v1#17.description("Chimei Innolux Corporation eDP-1-P130ZFA-BA1")

      [ 557837.530] {Default Queue} wl_output#16.done()

      [ 557857.019]  -> wl_display#1.get_registry(new id wl_registry#14)

      [ 557857.032]  -> wl_display#1.sync(new id wl_callback#22)

      [ 557867.434] {Display Queue} wl_display#1.delete_id(22)

      Attachments

        1. demo1.7z
          4 kB
        2. wayland.log
          25 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            tsl115 Shilin Tian
            Liang Qi Liang Qi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes